@backstage/plugin-scaffolder-backend-module-github 0.2.4 → 0.2.5

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @backstage/plugin-scaffolder-backend-module-github
2
2
 
3
+ ## 0.2.5
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @backstage/backend-common@0.21.5
9
+ - @backstage/plugin-scaffolder-node@0.4.1
10
+ - @backstage/backend-plugin-api@0.6.15
11
+ - @backstage/config@1.2.0
12
+ - @backstage/errors@1.2.4
13
+ - @backstage/integration@1.9.1
14
+
3
15
  ## 0.2.4
4
16
 
5
17
  ### Patch Changes
package/dist/index.cjs.js CHANGED
@@ -15,11 +15,11 @@ var octokitPluginCreatePullRequest = require('octokit-plugin-create-pull-request
15
15
  var backendPluginApi = require('@backstage/backend-plugin-api');
16
16
  var alpha = require('@backstage/plugin-scaffolder-node/alpha');
17
17
 
18
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
18
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
19
19
 
20
- var Sodium__default = /*#__PURE__*/_interopDefaultLegacy(Sodium);
21
- var yaml__default = /*#__PURE__*/_interopDefaultLegacy(yaml);
22
- var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
20
+ var Sodium__default = /*#__PURE__*/_interopDefaultCompat(Sodium);
21
+ var yaml__default = /*#__PURE__*/_interopDefaultCompat(yaml);
22
+ var path__default = /*#__PURE__*/_interopDefaultCompat(path);
23
23
 
24
24
  const enableBranchProtectionOnDefaultRepoBranch = async ({
25
25
  repoName,
@@ -268,20 +268,20 @@ async function createGithubRepoWithCollaboratorsAndTopics(client, repo, owner, r
268
268
  owner,
269
269
  repo
270
270
  });
271
- await Sodium__default["default"].ready;
272
- const binaryKey = Sodium__default["default"].from_base64(
271
+ await Sodium__default.default.ready;
272
+ const binaryKey = Sodium__default.default.from_base64(
273
273
  publicKeyResponse.data.key,
274
- Sodium__default["default"].base64_variants.ORIGINAL
274
+ Sodium__default.default.base64_variants.ORIGINAL
275
275
  );
276
276
  for (const [key, value] of Object.entries(secrets)) {
277
- const binarySecret = Sodium__default["default"].from_string(value);
278
- const encryptedBinarySecret = Sodium__default["default"].crypto_box_seal(
277
+ const binarySecret = Sodium__default.default.from_string(value);
278
+ const encryptedBinarySecret = Sodium__default.default.crypto_box_seal(
279
279
  binarySecret,
280
280
  binaryKey
281
281
  );
282
- const encryptedBase64Secret = Sodium__default["default"].to_base64(
282
+ const encryptedBase64Secret = Sodium__default.default.to_base64(
283
283
  encryptedBinarySecret,
284
- Sodium__default["default"].base64_variants.ORIGINAL
284
+ Sodium__default.default.base64_variants.ORIGINAL
285
285
  );
286
286
  await client.rest.actions.createOrUpdateRepoSecret({
287
287
  owner,
@@ -380,7 +380,7 @@ function getGitCommitMessage(gitCommitMessage, config) {
380
380
  const examples$9 = [
381
381
  {
382
382
  description: "GitHub Action Workflow Without Inputs.",
383
- example: yaml__default["default"].stringify({
383
+ example: yaml__default.default.stringify({
384
384
  steps: [
385
385
  {
386
386
  action: "github:actions:dispatch",
@@ -396,7 +396,7 @@ const examples$9 = [
396
396
  },
397
397
  {
398
398
  description: "GitHub Action Workflow With Inputs",
399
- example: yaml__default["default"].stringify({
399
+ example: yaml__default.default.stringify({
400
400
  steps: [
401
401
  {
402
402
  action: "github:actions:dispatch",
@@ -416,7 +416,7 @@ const examples$9 = [
416
416
  },
417
417
  {
418
418
  description: "GitHub Action Workflow With Custom Token",
419
- example: yaml__default["default"].stringify({
419
+ example: yaml__default.default.stringify({
420
420
  steps: [
421
421
  {
422
422
  action: "github:actions:dispatch",
@@ -510,7 +510,7 @@ function createGithubActionsDispatchAction(options) {
510
510
  const examples$8 = [
511
511
  {
512
512
  description: "Add labels to pull request or issue",
513
- example: yaml__default["default"].stringify({
513
+ example: yaml__default.default.stringify({
514
514
  steps: [
515
515
  {
516
516
  action: "github:issues:label",
@@ -526,7 +526,7 @@ const examples$8 = [
526
526
  },
527
527
  {
528
528
  description: "Add labels to pull request or issue with specific token",
529
- example: yaml__default["default"].stringify({
529
+ example: yaml__default.default.stringify({
530
530
  steps: [
531
531
  {
532
532
  action: "github:issues:label",
@@ -895,7 +895,7 @@ const commitHash = {
895
895
  const examples$7 = [
896
896
  {
897
897
  description: "Creates a GitHub repository with default configuration.",
898
- example: yaml__default["default"].stringify({
898
+ example: yaml__default.default.stringify({
899
899
  steps: [
900
900
  {
901
901
  action: "github:repo:create",
@@ -909,7 +909,7 @@ const examples$7 = [
909
909
  },
910
910
  {
911
911
  description: "Add a description.",
912
- example: yaml__default["default"].stringify({
912
+ example: yaml__default.default.stringify({
913
913
  steps: [
914
914
  {
915
915
  action: "github:repo:create",
@@ -924,7 +924,7 @@ const examples$7 = [
924
924
  },
925
925
  {
926
926
  description: "Disable wiki and issues.",
927
- example: yaml__default["default"].stringify({
927
+ example: yaml__default.default.stringify({
928
928
  steps: [
929
929
  {
930
930
  action: "github:repo:create",
@@ -1058,7 +1058,7 @@ function createGithubRepoCreateAction(options) {
1058
1058
  const examples$6 = [
1059
1059
  {
1060
1060
  description: "Setup repo with no modifications to branch protection rules",
1061
- example: yaml__default["default"].stringify({
1061
+ example: yaml__default.default.stringify({
1062
1062
  steps: [
1063
1063
  {
1064
1064
  action: "github:repo:push",
@@ -1072,7 +1072,7 @@ const examples$6 = [
1072
1072
  },
1073
1073
  {
1074
1074
  description: "Setup repo with required codeowners check",
1075
- example: yaml__default["default"].stringify({
1075
+ example: yaml__default.default.stringify({
1076
1076
  steps: [
1077
1077
  {
1078
1078
  action: "github:repo:push",
@@ -1087,7 +1087,7 @@ const examples$6 = [
1087
1087
  },
1088
1088
  {
1089
1089
  description: "Change the default required number of approvals",
1090
- example: yaml__default["default"].stringify({
1090
+ example: yaml__default.default.stringify({
1091
1091
  steps: [
1092
1092
  {
1093
1093
  action: "github:repo:push",
@@ -1212,7 +1212,7 @@ function createGithubRepoPushAction(options) {
1212
1212
  const examples$5 = [
1213
1213
  {
1214
1214
  description: "Create a GitHub webhook for a repository",
1215
- example: yaml__default["default"].stringify({
1215
+ example: yaml__default.default.stringify({
1216
1216
  steps: [
1217
1217
  {
1218
1218
  action: "github:webhook",
@@ -1233,7 +1233,7 @@ const examples$5 = [
1233
1233
  },
1234
1234
  {
1235
1235
  description: "Create a GitHub webhook with minimal configuration",
1236
- example: yaml__default["default"].stringify({
1236
+ example: yaml__default.default.stringify({
1237
1237
  steps: [
1238
1238
  {
1239
1239
  action: "github:webhook",
@@ -1248,7 +1248,7 @@ const examples$5 = [
1248
1248
  },
1249
1249
  {
1250
1250
  description: "Create a GitHub webhook with custom events",
1251
- example: yaml__default["default"].stringify({
1251
+ example: yaml__default.default.stringify({
1252
1252
  steps: [
1253
1253
  {
1254
1254
  action: "github:webhook",
@@ -1264,7 +1264,7 @@ const examples$5 = [
1264
1264
  },
1265
1265
  {
1266
1266
  description: "Create a GitHub webhook with JSON content type",
1267
- example: yaml__default["default"].stringify({
1267
+ example: yaml__default.default.stringify({
1268
1268
  steps: [
1269
1269
  {
1270
1270
  action: "github:webhook",
@@ -1280,7 +1280,7 @@ const examples$5 = [
1280
1280
  },
1281
1281
  {
1282
1282
  description: "Create a GitHub webhook with insecure SSL",
1283
- example: yaml__default["default"].stringify({
1283
+ example: yaml__default.default.stringify({
1284
1284
  steps: [
1285
1285
  {
1286
1286
  action: "github:webhook",
@@ -1296,7 +1296,7 @@ const examples$5 = [
1296
1296
  },
1297
1297
  {
1298
1298
  description: "Create an inactive GitHub webhook",
1299
- example: yaml__default["default"].stringify({
1299
+ example: yaml__default.default.stringify({
1300
1300
  steps: [
1301
1301
  {
1302
1302
  action: "github:webhook",
@@ -1434,7 +1434,7 @@ function createGithubWebhookAction(options) {
1434
1434
  const examples$4 = [
1435
1435
  {
1436
1436
  description: "Example 1: Create and store a Deploy Key",
1437
- example: yaml__default["default"].stringify({
1437
+ example: yaml__default.default.stringify({
1438
1438
  steps: [
1439
1439
  {
1440
1440
  action: "github:deployKey:create",
@@ -1533,19 +1533,19 @@ function createGithubDeployKeyAction(options) {
1533
1533
  owner,
1534
1534
  repo
1535
1535
  });
1536
- await Sodium__default["default"].ready;
1537
- const binaryKey = Sodium__default["default"].from_base64(
1536
+ await Sodium__default.default.ready;
1537
+ const binaryKey = Sodium__default.default.from_base64(
1538
1538
  publicKeyResponse.data.key,
1539
- Sodium__default["default"].base64_variants.ORIGINAL
1539
+ Sodium__default.default.base64_variants.ORIGINAL
1540
1540
  );
1541
- const binarySecret = Sodium__default["default"].from_string(privateKey);
1542
- const encryptedBinarySecret = Sodium__default["default"].crypto_box_seal(
1541
+ const binarySecret = Sodium__default.default.from_string(privateKey);
1542
+ const encryptedBinarySecret = Sodium__default.default.crypto_box_seal(
1543
1543
  binarySecret,
1544
1544
  binaryKey
1545
1545
  );
1546
- const encryptedBase64Secret = Sodium__default["default"].to_base64(
1546
+ const encryptedBase64Secret = Sodium__default.default.to_base64(
1547
1547
  encryptedBinarySecret,
1548
- Sodium__default["default"].base64_variants.ORIGINAL
1548
+ Sodium__default.default.base64_variants.ORIGINAL
1549
1549
  );
1550
1550
  await client.rest.actions.createOrUpdateRepoSecret({
1551
1551
  owner,
@@ -1562,7 +1562,7 @@ function createGithubDeployKeyAction(options) {
1562
1562
  const examples$3 = [
1563
1563
  {
1564
1564
  description: "Create a GitHub Environment (No Policies, No Variables, No Secrets)",
1565
- example: yaml__default["default"].stringify({
1565
+ example: yaml__default.default.stringify({
1566
1566
  steps: [
1567
1567
  {
1568
1568
  action: "github:environment:create",
@@ -1577,7 +1577,7 @@ const examples$3 = [
1577
1577
  },
1578
1578
  {
1579
1579
  description: "Create a GitHub Environment with Protected Branch Policy",
1580
- example: yaml__default["default"].stringify({
1580
+ example: yaml__default.default.stringify({
1581
1581
  steps: [
1582
1582
  {
1583
1583
  action: "github:environment:create",
@@ -1596,7 +1596,7 @@ const examples$3 = [
1596
1596
  },
1597
1597
  {
1598
1598
  description: "Create a GitHub Environment with Custom Branch Policies",
1599
- example: yaml__default["default"].stringify({
1599
+ example: yaml__default.default.stringify({
1600
1600
  steps: [
1601
1601
  {
1602
1602
  action: "github:environment:create",
@@ -1616,7 +1616,7 @@ const examples$3 = [
1616
1616
  },
1617
1617
  {
1618
1618
  description: "Create a GitHub Environment with Environment Variables and Secrets",
1619
- example: yaml__default["default"].stringify({
1619
+ example: yaml__default.default.stringify({
1620
1620
  steps: [
1621
1621
  {
1622
1622
  action: "github:environment:create",
@@ -1759,20 +1759,20 @@ function createGithubEnvironmentAction(options) {
1759
1759
  repository_id: repository.data.id,
1760
1760
  environment_name: name
1761
1761
  });
1762
- await Sodium__default["default"].ready;
1763
- const binaryKey = Sodium__default["default"].from_base64(
1762
+ await Sodium__default.default.ready;
1763
+ const binaryKey = Sodium__default.default.from_base64(
1764
1764
  publicKeyResponse.data.key,
1765
- Sodium__default["default"].base64_variants.ORIGINAL
1765
+ Sodium__default.default.base64_variants.ORIGINAL
1766
1766
  );
1767
1767
  for (const [key, value] of Object.entries(secrets)) {
1768
- const binarySecret = Sodium__default["default"].from_string(value);
1769
- const encryptedBinarySecret = Sodium__default["default"].crypto_box_seal(
1768
+ const binarySecret = Sodium__default.default.from_string(value);
1769
+ const encryptedBinarySecret = Sodium__default.default.crypto_box_seal(
1770
1770
  binarySecret,
1771
1771
  binaryKey
1772
1772
  );
1773
- const encryptedBase64Secret = Sodium__default["default"].to_base64(
1773
+ const encryptedBase64Secret = Sodium__default.default.to_base64(
1774
1774
  encryptedBinarySecret,
1775
- Sodium__default["default"].base64_variants.ORIGINAL
1775
+ Sodium__default.default.base64_variants.ORIGINAL
1776
1776
  );
1777
1777
  await client.rest.actions.createOrUpdateEnvironmentSecret({
1778
1778
  repository_id: repository.data.id,
@@ -1790,7 +1790,7 @@ function createGithubEnvironmentAction(options) {
1790
1790
  const examples$2 = [
1791
1791
  {
1792
1792
  description: "Create a pull request",
1793
- example: yaml__default["default"].stringify({
1793
+ example: yaml__default.default.stringify({
1794
1794
  steps: [
1795
1795
  {
1796
1796
  action: "publish:github:pull-request",
@@ -1807,7 +1807,7 @@ const examples$2 = [
1807
1807
  },
1808
1808
  {
1809
1809
  description: "Create a pull request with target branch name",
1810
- example: yaml__default["default"].stringify({
1810
+ example: yaml__default.default.stringify({
1811
1811
  steps: [
1812
1812
  {
1813
1813
  action: "publish:github:pull-request",
@@ -1825,7 +1825,7 @@ const examples$2 = [
1825
1825
  },
1826
1826
  {
1827
1827
  description: "Create a pull request as draft",
1828
- example: yaml__default["default"].stringify({
1828
+ example: yaml__default.default.stringify({
1829
1829
  steps: [
1830
1830
  {
1831
1831
  action: "publish:github:pull-request",
@@ -1843,7 +1843,7 @@ const examples$2 = [
1843
1843
  },
1844
1844
  {
1845
1845
  description: "Create a pull request with target path",
1846
- example: yaml__default["default"].stringify({
1846
+ example: yaml__default.default.stringify({
1847
1847
  steps: [
1848
1848
  {
1849
1849
  action: "publish:github:pull-request",
@@ -1861,7 +1861,7 @@ const examples$2 = [
1861
1861
  },
1862
1862
  {
1863
1863
  description: "Create a pull request with source path",
1864
- example: yaml__default["default"].stringify({
1864
+ example: yaml__default.default.stringify({
1865
1865
  steps: [
1866
1866
  {
1867
1867
  action: "publish:github:pull-request",
@@ -1879,7 +1879,7 @@ const examples$2 = [
1879
1879
  },
1880
1880
  {
1881
1881
  description: "Create a pull request with token",
1882
- example: yaml__default["default"].stringify({
1882
+ example: yaml__default.default.stringify({
1883
1883
  steps: [
1884
1884
  {
1885
1885
  action: "publish:github:pull-request",
@@ -1897,7 +1897,7 @@ const examples$2 = [
1897
1897
  },
1898
1898
  {
1899
1899
  description: "Create a pull request with reviewers",
1900
- example: yaml__default["default"].stringify({
1900
+ example: yaml__default.default.stringify({
1901
1901
  steps: [
1902
1902
  {
1903
1903
  action: "publish:github:pull-request",
@@ -1915,7 +1915,7 @@ const examples$2 = [
1915
1915
  },
1916
1916
  {
1917
1917
  description: "Create a pull request with team reviewers",
1918
- example: yaml__default["default"].stringify({
1918
+ example: yaml__default.default.stringify({
1919
1919
  steps: [
1920
1920
  {
1921
1921
  action: "publish:github:pull-request",
@@ -1933,7 +1933,7 @@ const examples$2 = [
1933
1933
  },
1934
1934
  {
1935
1935
  description: "Create a pull request with commit message",
1936
- example: yaml__default["default"].stringify({
1936
+ example: yaml__default.default.stringify({
1937
1937
  steps: [
1938
1938
  {
1939
1939
  action: "publish:github:pull-request",
@@ -1951,7 +1951,7 @@ const examples$2 = [
1951
1951
  },
1952
1952
  {
1953
1953
  description: "Create a pull request with all parameters",
1954
- example: yaml__default["default"].stringify({
1954
+ example: yaml__default.default.stringify({
1955
1955
  steps: [
1956
1956
  {
1957
1957
  action: "publish:github:pull-request",
@@ -2159,7 +2159,7 @@ const createPublishGithubPullRequestAction = (options) => {
2159
2159
  const determineFileEncoding = (file) => file.symlink ? "utf-8" : "base64";
2160
2160
  const files = Object.fromEntries(
2161
2161
  directoryContents.map((file) => [
2162
- targetPath ? path__default["default"].posix.join(targetPath, file.path) : file.path,
2162
+ targetPath ? path__default.default.posix.join(targetPath, file.path) : file.path,
2163
2163
  {
2164
2164
  // See the properties of tree items
2165
2165
  // in https://docs.github.com/en/rest/reference/git#trees
@@ -2247,7 +2247,7 @@ const createPublishGithubPullRequestAction = (options) => {
2247
2247
  const examples$1 = [
2248
2248
  {
2249
2249
  description: "Initializes a git repository of contents in workspace and publish it to GitHub with default configuration.",
2250
- example: yaml__default["default"].stringify({
2250
+ example: yaml__default.default.stringify({
2251
2251
  steps: [
2252
2252
  {
2253
2253
  id: "publish",
@@ -2262,7 +2262,7 @@ const examples$1 = [
2262
2262
  },
2263
2263
  {
2264
2264
  description: "Add a description.",
2265
- example: yaml__default["default"].stringify({
2265
+ example: yaml__default.default.stringify({
2266
2266
  steps: [
2267
2267
  {
2268
2268
  id: "publish",
@@ -2278,7 +2278,7 @@ const examples$1 = [
2278
2278
  },
2279
2279
  {
2280
2280
  description: "Change visibility of the repository.",
2281
- example: yaml__default["default"].stringify({
2281
+ example: yaml__default.default.stringify({
2282
2282
  steps: [
2283
2283
  {
2284
2284
  id: "publish",
@@ -2467,7 +2467,7 @@ function createPublishGithubAction(options) {
2467
2467
  const examples = [
2468
2468
  {
2469
2469
  description: "GitHub alphanumric autolink reference",
2470
- example: yaml__default["default"].stringify({
2470
+ example: yaml__default.default.stringify({
2471
2471
  steps: [
2472
2472
  {
2473
2473
  action: "github:autolinks:create",
@@ -2615,6 +2615,6 @@ exports.createGithubRepoPushAction = createGithubRepoPushAction;
2615
2615
  exports.createGithubWebhookAction = createGithubWebhookAction;
2616
2616
  exports.createPublishGithubAction = createPublishGithubAction;
2617
2617
  exports.createPublishGithubPullRequestAction = createPublishGithubPullRequestAction;
2618
- exports["default"] = githubModule;
2618
+ exports.default = githubModule;
2619
2619
  exports.getOctokitOptions = getOctokitOptions;
2620
2620
  //# sourceMappingURL=index.cjs.js.map