@backstage/plugin-scaffolder-backend-module-github 0.4.0-next.0 → 0.4.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/index.cjs.js +142 -22
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +19 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @backstage/plugin-scaffolder-backend-module-github
|
|
2
2
|
|
|
3
|
+
## 0.4.0-next.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 141f366: Added action to enable GitHub Pages on a repo
|
|
8
|
+
- dfaa28d: Adds `requireLastPushApproval` input property to configure Branch Protection Settings in `github:publish` action
|
|
9
|
+
|
|
10
|
+
Adds `requireLastPushApproval` input property to configure Branch Protection Settings in `github:repo:push` action
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
- @backstage/backend-common@0.23.3-next.1
|
|
14
|
+
- @backstage/backend-plugin-api@0.6.22-next.1
|
|
15
|
+
- @backstage/config@1.2.0
|
|
16
|
+
- @backstage/errors@1.2.4
|
|
17
|
+
- @backstage/integration@1.13.0-next.0
|
|
18
|
+
- @backstage/plugin-scaffolder-node@0.4.8-next.1
|
|
19
|
+
|
|
3
20
|
## 0.4.0-next.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|
package/dist/index.cjs.js
CHANGED
|
@@ -12,6 +12,7 @@ var webhooks = require('@octokit/webhooks');
|
|
|
12
12
|
var path = require('path');
|
|
13
13
|
var octokitPluginCreatePullRequest = require('octokit-plugin-create-pull-request');
|
|
14
14
|
var backendPluginApi = require('@backstage/backend-plugin-api');
|
|
15
|
+
var pluginScaffolderBackendModuleGithub = require('@backstage/plugin-scaffolder-backend-module-github');
|
|
15
16
|
var alpha = require('@backstage/plugin-scaffolder-node/alpha');
|
|
16
17
|
|
|
17
18
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
@@ -32,6 +33,7 @@ const enableBranchProtectionOnDefaultRepoBranch = async ({
|
|
|
32
33
|
requiredStatusCheckContexts = [],
|
|
33
34
|
requireBranchesToBeUpToDate = true,
|
|
34
35
|
requiredConversationResolution = false,
|
|
36
|
+
requireLastPushApproval = false,
|
|
35
37
|
defaultBranch = "master",
|
|
36
38
|
enforceAdmins = true,
|
|
37
39
|
dismissStaleReviews = false,
|
|
@@ -63,7 +65,8 @@ const enableBranchProtectionOnDefaultRepoBranch = async ({
|
|
|
63
65
|
required_approving_review_count: requiredApprovingReviewCount,
|
|
64
66
|
require_code_owner_reviews: requireCodeOwnerReviews,
|
|
65
67
|
bypass_pull_request_allowances: bypassPullRequestAllowances,
|
|
66
|
-
dismiss_stale_reviews: dismissStaleReviews
|
|
68
|
+
dismiss_stale_reviews: dismissStaleReviews,
|
|
69
|
+
require_last_push_approval: requireLastPushApproval
|
|
67
70
|
},
|
|
68
71
|
required_conversation_resolution: requiredConversationResolution
|
|
69
72
|
});
|
|
@@ -303,7 +306,7 @@ async function createGithubRepoWithCollaboratorsAndTopics(client, repo, owner, r
|
|
|
303
306
|
}
|
|
304
307
|
return newRepo;
|
|
305
308
|
}
|
|
306
|
-
async function initRepoPushAndProtect(remoteUrl, password, workspacePath, sourcePath, defaultBranch, protectDefaultBranch, protectEnforceAdmins, owner, client, repo, requireCodeOwnerReviews, bypassPullRequestAllowances, requiredApprovingReviewCount, restrictions, requiredStatusCheckContexts, requireBranchesToBeUpToDate, requiredConversationResolution, config, logger, gitCommitMessage, gitAuthorName, gitAuthorEmail, dismissStaleReviews, requiredCommitSigning) {
|
|
309
|
+
async function initRepoPushAndProtect(remoteUrl, password, workspacePath, sourcePath, defaultBranch, protectDefaultBranch, protectEnforceAdmins, owner, client, repo, requireCodeOwnerReviews, bypassPullRequestAllowances, requiredApprovingReviewCount, restrictions, requiredStatusCheckContexts, requireBranchesToBeUpToDate, requiredConversationResolution, requireLastPushApproval, config, logger, gitCommitMessage, gitAuthorName, gitAuthorEmail, dismissStaleReviews, requiredCommitSigning) {
|
|
307
310
|
const gitAuthorInfo = {
|
|
308
311
|
name: gitAuthorName ? gitAuthorName : config.getOptionalString("scaffolder.defaultAuthor.name"),
|
|
309
312
|
email: gitAuthorEmail ? gitAuthorEmail : config.getOptionalString("scaffolder.defaultAuthor.email")
|
|
@@ -336,6 +339,7 @@ async function initRepoPushAndProtect(remoteUrl, password, workspacePath, source
|
|
|
336
339
|
requiredStatusCheckContexts,
|
|
337
340
|
requireBranchesToBeUpToDate,
|
|
338
341
|
requiredConversationResolution,
|
|
342
|
+
requireLastPushApproval,
|
|
339
343
|
enforceAdmins: protectEnforceAdmins,
|
|
340
344
|
dismissStaleReviews,
|
|
341
345
|
requiredCommitSigning
|
|
@@ -373,7 +377,7 @@ function getGitCommitMessage(gitCommitMessage, config) {
|
|
|
373
377
|
return gitCommitMessage ? gitCommitMessage : config.getOptionalString("scaffolder.defaultCommitMessage");
|
|
374
378
|
}
|
|
375
379
|
|
|
376
|
-
const examples$
|
|
380
|
+
const examples$a = [
|
|
377
381
|
{
|
|
378
382
|
description: "GitHub Action Workflow Without Inputs.",
|
|
379
383
|
example: yaml__default.default.stringify({
|
|
@@ -434,7 +438,7 @@ function createGithubActionsDispatchAction(options) {
|
|
|
434
438
|
return pluginScaffolderNode.createTemplateAction({
|
|
435
439
|
id: "github:actions:dispatch",
|
|
436
440
|
description: "Dispatches a GitHub Action workflow for a given branch or tag",
|
|
437
|
-
examples: examples$
|
|
441
|
+
examples: examples$a,
|
|
438
442
|
schema: {
|
|
439
443
|
input: {
|
|
440
444
|
type: "object",
|
|
@@ -503,7 +507,7 @@ function createGithubActionsDispatchAction(options) {
|
|
|
503
507
|
});
|
|
504
508
|
}
|
|
505
509
|
|
|
506
|
-
const examples$
|
|
510
|
+
const examples$9 = [
|
|
507
511
|
{
|
|
508
512
|
description: "Add labels to pull request or issue",
|
|
509
513
|
example: yaml__default.default.stringify({
|
|
@@ -544,7 +548,7 @@ function createGithubIssuesLabelAction(options) {
|
|
|
544
548
|
return pluginScaffolderNode.createTemplateAction({
|
|
545
549
|
id: "github:issues:label",
|
|
546
550
|
description: "Adds labels to a pull request or issue on GitHub.",
|
|
547
|
-
examples: examples$
|
|
551
|
+
examples: examples$9,
|
|
548
552
|
schema: {
|
|
549
553
|
input: {
|
|
550
554
|
type: "object",
|
|
@@ -654,6 +658,11 @@ const requiredConversationResolution = {
|
|
|
654
658
|
description: "Requires all conversations on code to be resolved before a pull request can be merged into this branch",
|
|
655
659
|
type: "boolean"
|
|
656
660
|
};
|
|
661
|
+
const requireLastPushApproval = {
|
|
662
|
+
title: "Require last push approval",
|
|
663
|
+
type: "boolean",
|
|
664
|
+
description: `Whether the most recent push to a PR must be approved by someone other than the person who pushed it. The default value is 'false'`
|
|
665
|
+
};
|
|
657
666
|
const repoVisibility = {
|
|
658
667
|
title: "Repository Visibility",
|
|
659
668
|
type: "string",
|
|
@@ -888,7 +897,7 @@ const commitHash = {
|
|
|
888
897
|
type: "string"
|
|
889
898
|
};
|
|
890
899
|
|
|
891
|
-
const examples$
|
|
900
|
+
const examples$8 = [
|
|
892
901
|
{
|
|
893
902
|
description: "Creates a GitHub repository with default configuration.",
|
|
894
903
|
example: yaml__default.default.stringify({
|
|
@@ -941,7 +950,7 @@ function createGithubRepoCreateAction(options) {
|
|
|
941
950
|
return pluginScaffolderNode.createTemplateAction({
|
|
942
951
|
id: "github:repo:create",
|
|
943
952
|
description: "Creates a GitHub repository.",
|
|
944
|
-
examples: examples$
|
|
953
|
+
examples: examples$8,
|
|
945
954
|
schema: {
|
|
946
955
|
input: {
|
|
947
956
|
type: "object",
|
|
@@ -1051,7 +1060,7 @@ function createGithubRepoCreateAction(options) {
|
|
|
1051
1060
|
});
|
|
1052
1061
|
}
|
|
1053
1062
|
|
|
1054
|
-
const examples$
|
|
1063
|
+
const examples$7 = [
|
|
1055
1064
|
{
|
|
1056
1065
|
description: "Setup repo with no modifications to branch protection rules",
|
|
1057
1066
|
example: yaml__default.default.stringify({
|
|
@@ -1103,7 +1112,7 @@ function createGithubRepoPushAction(options) {
|
|
|
1103
1112
|
return pluginScaffolderNode.createTemplateAction({
|
|
1104
1113
|
id: "github:repo:push",
|
|
1105
1114
|
description: "Initializes a git repository of contents in workspace and publishes it to GitHub.",
|
|
1106
|
-
examples: examples$
|
|
1115
|
+
examples: examples$7,
|
|
1107
1116
|
schema: {
|
|
1108
1117
|
input: {
|
|
1109
1118
|
type: "object",
|
|
@@ -1118,6 +1127,7 @@ function createGithubRepoPushAction(options) {
|
|
|
1118
1127
|
restrictions: restrictions,
|
|
1119
1128
|
requireBranchesToBeUpToDate: requireBranchesToBeUpToDate,
|
|
1120
1129
|
requiredConversationResolution: requiredConversationResolution,
|
|
1130
|
+
requireLastPushApproval: requireLastPushApproval,
|
|
1121
1131
|
defaultBranch: defaultBranch,
|
|
1122
1132
|
protectDefaultBranch: protectDefaultBranch,
|
|
1123
1133
|
protectEnforceAdmins: protectEnforceAdmins,
|
|
@@ -1155,6 +1165,7 @@ function createGithubRepoPushAction(options) {
|
|
|
1155
1165
|
requiredStatusCheckContexts = [],
|
|
1156
1166
|
requireBranchesToBeUpToDate = true,
|
|
1157
1167
|
requiredConversationResolution = false,
|
|
1168
|
+
requireLastPushApproval = false,
|
|
1158
1169
|
token: providedToken,
|
|
1159
1170
|
requiredCommitSigning = false
|
|
1160
1171
|
} = ctx.input;
|
|
@@ -1190,6 +1201,7 @@ function createGithubRepoPushAction(options) {
|
|
|
1190
1201
|
requiredStatusCheckContexts,
|
|
1191
1202
|
requireBranchesToBeUpToDate,
|
|
1192
1203
|
requiredConversationResolution,
|
|
1204
|
+
requireLastPushApproval,
|
|
1193
1205
|
config,
|
|
1194
1206
|
ctx.logger,
|
|
1195
1207
|
gitCommitMessage,
|
|
@@ -1205,7 +1217,7 @@ function createGithubRepoPushAction(options) {
|
|
|
1205
1217
|
});
|
|
1206
1218
|
}
|
|
1207
1219
|
|
|
1208
|
-
const examples$
|
|
1220
|
+
const examples$6 = [
|
|
1209
1221
|
{
|
|
1210
1222
|
description: "Create a GitHub webhook for a repository",
|
|
1211
1223
|
example: yaml__default.default.stringify({
|
|
@@ -1314,7 +1326,7 @@ function createGithubWebhookAction(options) {
|
|
|
1314
1326
|
return pluginScaffolderNode.createTemplateAction({
|
|
1315
1327
|
id: "github:webhook",
|
|
1316
1328
|
description: "Creates webhook for a repository on GitHub.",
|
|
1317
|
-
examples: examples$
|
|
1329
|
+
examples: examples$6,
|
|
1318
1330
|
supportsDryRun: true,
|
|
1319
1331
|
schema: {
|
|
1320
1332
|
input: {
|
|
@@ -1432,7 +1444,7 @@ function createGithubWebhookAction(options) {
|
|
|
1432
1444
|
});
|
|
1433
1445
|
}
|
|
1434
1446
|
|
|
1435
|
-
const examples$
|
|
1447
|
+
const examples$5 = [
|
|
1436
1448
|
{
|
|
1437
1449
|
description: "Example 1: Create and store a Deploy Key",
|
|
1438
1450
|
example: yaml__default.default.stringify({
|
|
@@ -1457,7 +1469,7 @@ function createGithubDeployKeyAction(options) {
|
|
|
1457
1469
|
return pluginScaffolderNode.createTemplateAction({
|
|
1458
1470
|
id: "github:deployKey:create",
|
|
1459
1471
|
description: "Creates and stores Deploy Keys",
|
|
1460
|
-
examples: examples$
|
|
1472
|
+
examples: examples$5,
|
|
1461
1473
|
schema: {
|
|
1462
1474
|
input: {
|
|
1463
1475
|
type: "object",
|
|
@@ -1560,7 +1572,7 @@ function createGithubDeployKeyAction(options) {
|
|
|
1560
1572
|
});
|
|
1561
1573
|
}
|
|
1562
1574
|
|
|
1563
|
-
const examples$
|
|
1575
|
+
const examples$4 = [
|
|
1564
1576
|
{
|
|
1565
1577
|
description: "Create a GitHub Environment (No Policies, No Variables, No Secrets)",
|
|
1566
1578
|
example: yaml__default.default.stringify({
|
|
@@ -1645,7 +1657,7 @@ function createGithubEnvironmentAction(options) {
|
|
|
1645
1657
|
return pluginScaffolderNode.createTemplateAction({
|
|
1646
1658
|
id: "github:environment:create",
|
|
1647
1659
|
description: "Creates Deployment Environments",
|
|
1648
|
-
examples: examples$
|
|
1660
|
+
examples: examples$4,
|
|
1649
1661
|
schema: {
|
|
1650
1662
|
input: {
|
|
1651
1663
|
type: "object",
|
|
@@ -1815,7 +1827,7 @@ function createGithubEnvironmentAction(options) {
|
|
|
1815
1827
|
});
|
|
1816
1828
|
}
|
|
1817
1829
|
|
|
1818
|
-
const examples$
|
|
1830
|
+
const examples$3 = [
|
|
1819
1831
|
{
|
|
1820
1832
|
description: "Create a pull request",
|
|
1821
1833
|
example: yaml__default.default.stringify({
|
|
@@ -2099,7 +2111,7 @@ const createPublishGithubPullRequestAction = (options) => {
|
|
|
2099
2111
|
} = options;
|
|
2100
2112
|
return pluginScaffolderNode.createTemplateAction({
|
|
2101
2113
|
id: "publish:github:pull-request",
|
|
2102
|
-
examples: examples$
|
|
2114
|
+
examples: examples$3,
|
|
2103
2115
|
supportsDryRun: true,
|
|
2104
2116
|
schema: {
|
|
2105
2117
|
input: {
|
|
@@ -2383,7 +2395,7 @@ const createPublishGithubPullRequestAction = (options) => {
|
|
|
2383
2395
|
}
|
|
2384
2396
|
};
|
|
2385
2397
|
|
|
2386
|
-
const examples$
|
|
2398
|
+
const examples$2 = [
|
|
2387
2399
|
{
|
|
2388
2400
|
description: "Initializes a git repository with the content in the workspace, and publishes it to GitHub with the default configuration.",
|
|
2389
2401
|
example: yaml__default.default.stringify({
|
|
@@ -2438,7 +2450,7 @@ function createPublishGithubAction(options) {
|
|
|
2438
2450
|
return pluginScaffolderNode.createTemplateAction({
|
|
2439
2451
|
id: "publish:github",
|
|
2440
2452
|
description: "Initializes a git repository of contents in workspace and publishes it to GitHub.",
|
|
2441
|
-
examples: examples$
|
|
2453
|
+
examples: examples$2,
|
|
2442
2454
|
schema: {
|
|
2443
2455
|
input: {
|
|
2444
2456
|
type: "object",
|
|
@@ -2456,6 +2468,7 @@ function createPublishGithubAction(options) {
|
|
|
2456
2468
|
requiredStatusCheckContexts: requiredStatusCheckContexts,
|
|
2457
2469
|
requireBranchesToBeUpToDate: requireBranchesToBeUpToDate,
|
|
2458
2470
|
requiredConversationResolution: requiredConversationResolution,
|
|
2471
|
+
requireLastPushApproval: requireLastPushApproval,
|
|
2459
2472
|
repoVisibility: repoVisibility,
|
|
2460
2473
|
defaultBranch: defaultBranch,
|
|
2461
2474
|
protectDefaultBranch: protectDefaultBranch,
|
|
@@ -2506,6 +2519,7 @@ function createPublishGithubAction(options) {
|
|
|
2506
2519
|
requiredStatusCheckContexts = [],
|
|
2507
2520
|
requireBranchesToBeUpToDate = true,
|
|
2508
2521
|
requiredConversationResolution = false,
|
|
2522
|
+
requireLastPushApproval = false,
|
|
2509
2523
|
repoVisibility = "private",
|
|
2510
2524
|
defaultBranch = "master",
|
|
2511
2525
|
protectDefaultBranch = true,
|
|
@@ -2587,6 +2601,7 @@ function createPublishGithubAction(options) {
|
|
|
2587
2601
|
requiredStatusCheckContexts,
|
|
2588
2602
|
requireBranchesToBeUpToDate,
|
|
2589
2603
|
requiredConversationResolution,
|
|
2604
|
+
requireLastPushApproval,
|
|
2590
2605
|
config,
|
|
2591
2606
|
ctx.logger,
|
|
2592
2607
|
gitCommitMessage,
|
|
@@ -2602,7 +2617,7 @@ function createPublishGithubAction(options) {
|
|
|
2602
2617
|
});
|
|
2603
2618
|
}
|
|
2604
2619
|
|
|
2605
|
-
const examples = [
|
|
2620
|
+
const examples$1 = [
|
|
2606
2621
|
{
|
|
2607
2622
|
description: "GitHub alphanumric autolink reference",
|
|
2608
2623
|
example: yaml__default.default.stringify({
|
|
@@ -2627,7 +2642,7 @@ function createGithubAutolinksAction(options) {
|
|
|
2627
2642
|
return pluginScaffolderNode.createTemplateAction({
|
|
2628
2643
|
id: "github:autolinks:create",
|
|
2629
2644
|
description: "Create an autolink reference for a repository",
|
|
2630
|
-
examples,
|
|
2645
|
+
examples: examples$1,
|
|
2631
2646
|
schema: {
|
|
2632
2647
|
input: {
|
|
2633
2648
|
type: "object",
|
|
@@ -2688,6 +2703,106 @@ function createGithubAutolinksAction(options) {
|
|
|
2688
2703
|
});
|
|
2689
2704
|
}
|
|
2690
2705
|
|
|
2706
|
+
const examples = [
|
|
2707
|
+
{
|
|
2708
|
+
description: "Enables GitHub Pages for a repository.",
|
|
2709
|
+
example: yaml__default.default.stringify({
|
|
2710
|
+
steps: [
|
|
2711
|
+
{
|
|
2712
|
+
action: "github:pages",
|
|
2713
|
+
id: "github-pages",
|
|
2714
|
+
name: "Enable GitHub Pages",
|
|
2715
|
+
input: {
|
|
2716
|
+
repoUrl: "github.com?repo=repo&owner=owner",
|
|
2717
|
+
buildType: "workflow",
|
|
2718
|
+
sourceBranch: "main",
|
|
2719
|
+
sourcePath: "/",
|
|
2720
|
+
token: "gph_YourGitHubToken"
|
|
2721
|
+
}
|
|
2722
|
+
}
|
|
2723
|
+
]
|
|
2724
|
+
})
|
|
2725
|
+
}
|
|
2726
|
+
];
|
|
2727
|
+
|
|
2728
|
+
function createGithubPagesEnableAction(options) {
|
|
2729
|
+
const { integrations, githubCredentialsProvider } = options;
|
|
2730
|
+
return pluginScaffolderNode.createTemplateAction({
|
|
2731
|
+
id: "github:pages:enable",
|
|
2732
|
+
examples,
|
|
2733
|
+
description: "Enables GitHub Pages for a repository.",
|
|
2734
|
+
schema: {
|
|
2735
|
+
input: {
|
|
2736
|
+
type: "object",
|
|
2737
|
+
required: ["repoUrl"],
|
|
2738
|
+
properties: {
|
|
2739
|
+
repoUrl: {
|
|
2740
|
+
title: "Repository Location",
|
|
2741
|
+
description: `Accepts the format 'github.com?repo=reponame&owner=owner' where 'reponame' is the new repository name and 'owner' is an organization or username`,
|
|
2742
|
+
type: "string"
|
|
2743
|
+
},
|
|
2744
|
+
buildType: {
|
|
2745
|
+
title: "Build Type",
|
|
2746
|
+
type: "string",
|
|
2747
|
+
description: 'The GitHub Pages build type - "legacy" or "workflow". Default is "workflow'
|
|
2748
|
+
},
|
|
2749
|
+
sourceBranch: {
|
|
2750
|
+
title: "Source Branch",
|
|
2751
|
+
type: "string",
|
|
2752
|
+
description: 'The the GitHub Pages source branch. Default is "main"'
|
|
2753
|
+
},
|
|
2754
|
+
sourcePath: {
|
|
2755
|
+
title: "Source Path",
|
|
2756
|
+
type: "string",
|
|
2757
|
+
description: 'The the GitHub Pages source path - "/" or "/docs". Default is "/"'
|
|
2758
|
+
},
|
|
2759
|
+
token: {
|
|
2760
|
+
title: "Authorization Token",
|
|
2761
|
+
type: "string",
|
|
2762
|
+
description: "The token to use for authorization to GitHub"
|
|
2763
|
+
}
|
|
2764
|
+
}
|
|
2765
|
+
}
|
|
2766
|
+
},
|
|
2767
|
+
async handler(ctx) {
|
|
2768
|
+
const {
|
|
2769
|
+
repoUrl,
|
|
2770
|
+
buildType = "workflow",
|
|
2771
|
+
sourceBranch = "main",
|
|
2772
|
+
sourcePath = "/",
|
|
2773
|
+
token: providedToken
|
|
2774
|
+
} = ctx.input;
|
|
2775
|
+
const octokitOptions = await pluginScaffolderBackendModuleGithub.getOctokitOptions({
|
|
2776
|
+
integrations,
|
|
2777
|
+
credentialsProvider: githubCredentialsProvider,
|
|
2778
|
+
token: providedToken,
|
|
2779
|
+
repoUrl
|
|
2780
|
+
});
|
|
2781
|
+
const client = new octokit.Octokit(octokitOptions);
|
|
2782
|
+
const { owner, repo } = pluginScaffolderNode.parseRepoUrl(repoUrl, integrations);
|
|
2783
|
+
if (!owner) {
|
|
2784
|
+
throw new errors.InputError("Invalid repository owner provided in repoUrl");
|
|
2785
|
+
}
|
|
2786
|
+
ctx.logger.info(
|
|
2787
|
+
`Attempting to enable GitHub Pages for ${owner}/${repo} with "${buildType}" build type, on source branch "${sourceBranch}" and source path "${sourcePath}"`
|
|
2788
|
+
);
|
|
2789
|
+
await client.request("POST /repos/{owner}/{repo}/pages", {
|
|
2790
|
+
owner,
|
|
2791
|
+
repo,
|
|
2792
|
+
build_type: buildType,
|
|
2793
|
+
source: {
|
|
2794
|
+
branch: sourceBranch,
|
|
2795
|
+
path: sourcePath
|
|
2796
|
+
},
|
|
2797
|
+
headers: {
|
|
2798
|
+
"X-GitHub-Api-Version": "2022-11-28"
|
|
2799
|
+
}
|
|
2800
|
+
});
|
|
2801
|
+
ctx.logger.info("Completed enabling GitHub Pages");
|
|
2802
|
+
}
|
|
2803
|
+
});
|
|
2804
|
+
}
|
|
2805
|
+
|
|
2691
2806
|
const githubModule = backendPluginApi.createBackendModule({
|
|
2692
2807
|
pluginId: "scaffolder",
|
|
2693
2808
|
moduleId: "github",
|
|
@@ -2737,6 +2852,10 @@ const githubModule = backendPluginApi.createBackendModule({
|
|
|
2737
2852
|
integrations,
|
|
2738
2853
|
githubCredentialsProvider,
|
|
2739
2854
|
config
|
|
2855
|
+
}),
|
|
2856
|
+
createGithubPagesEnableAction({
|
|
2857
|
+
integrations,
|
|
2858
|
+
githubCredentialsProvider
|
|
2740
2859
|
})
|
|
2741
2860
|
);
|
|
2742
2861
|
}
|
|
@@ -2749,6 +2868,7 @@ exports.createGithubAutolinksAction = createGithubAutolinksAction;
|
|
|
2749
2868
|
exports.createGithubDeployKeyAction = createGithubDeployKeyAction;
|
|
2750
2869
|
exports.createGithubEnvironmentAction = createGithubEnvironmentAction;
|
|
2751
2870
|
exports.createGithubIssuesLabelAction = createGithubIssuesLabelAction;
|
|
2871
|
+
exports.createGithubPagesEnableAction = createGithubPagesEnableAction;
|
|
2752
2872
|
exports.createGithubRepoCreateAction = createGithubRepoCreateAction;
|
|
2753
2873
|
exports.createGithubRepoPushAction = createGithubRepoPushAction;
|
|
2754
2874
|
exports.createGithubWebhookAction = createGithubWebhookAction;
|