@backstage/plugin-scaffolder-backend-module-github 0.5.0-next.0 → 0.5.0-next.2

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,30 @@
1
1
  # @backstage/plugin-scaffolder-backend-module-github
2
2
 
3
+ ## 0.5.0-next.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 22a19e6: Added the ability for the actions `publish:github` and `github:repo:create` to take inputs for 'custom properties' for organization repositories.
8
+ - Updated dependencies
9
+ - @backstage/backend-common@0.25.0-next.2
10
+ - @backstage/backend-plugin-api@1.0.0-next.2
11
+ - @backstage/integration@1.15.0-next.0
12
+ - @backstage/config@1.2.0
13
+ - @backstage/errors@1.2.4
14
+ - @backstage/plugin-scaffolder-node@0.4.11-next.2
15
+
16
+ ## 0.5.0-next.1
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies
21
+ - @backstage/backend-common@0.25.0-next.1
22
+ - @backstage/backend-plugin-api@0.9.0-next.1
23
+ - @backstage/config@1.2.0
24
+ - @backstage/errors@1.2.4
25
+ - @backstage/integration@1.14.0
26
+ - @backstage/plugin-scaffolder-node@0.4.11-next.1
27
+
3
28
  ## 0.5.0-next.0
4
29
 
5
30
  ### Minor Changes
package/dist/index.cjs.js CHANGED
@@ -144,7 +144,7 @@ async function getOctokitOptions(options) {
144
144
  previews: ["nebula-preview"]
145
145
  };
146
146
  }
147
- async function createGithubRepoWithCollaboratorsAndTopics(client, repo, owner, repoVisibility, description, homepage, deleteBranchOnMerge, allowMergeCommit, allowSquashMerge, squashMergeCommitTitle, squashMergeCommitMessage, allowRebaseMerge, allowAutoMerge, access, collaborators, hasProjects, hasWiki, hasIssues, topics, repoVariables, secrets, oidcCustomization, logger) {
147
+ async function createGithubRepoWithCollaboratorsAndTopics(client, repo, owner, repoVisibility, description, homepage, deleteBranchOnMerge, allowMergeCommit, allowSquashMerge, squashMergeCommitTitle, squashMergeCommitMessage, allowRebaseMerge, allowAutoMerge, access, collaborators, hasProjects, hasWiki, hasIssues, topics, repoVariables, secrets, oidcCustomization, customProperties, logger) {
148
148
  const user = await client.rest.users.getByUsername({
149
149
  username: owner
150
150
  });
@@ -168,7 +168,9 @@ async function createGithubRepoWithCollaboratorsAndTopics(client, repo, owner, r
168
168
  homepage,
169
169
  has_projects: hasProjects,
170
170
  has_wiki: hasWiki,
171
- has_issues: hasIssues
171
+ has_issues: hasIssues,
172
+ // Custom properties only available on org repos
173
+ custom_properties: customProperties
172
174
  }) : client.rest.repos.createForAuthenticatedUser({
173
175
  name: repo,
174
176
  private: repoVisibility === "private",
@@ -883,6 +885,11 @@ const oidcCustomization = {
883
885
  }
884
886
  }
885
887
  };
888
+ const customProperties = {
889
+ title: "Custom Repository Properties",
890
+ description: "Custom properties to be added to the repository (note, this only works for organization repositories)",
891
+ type: "object"
892
+ };
886
893
 
887
894
  const remoteUrl = {
888
895
  title: "A URL to the repository with the provider",
@@ -1890,7 +1897,8 @@ function createGithubRepoCreateAction(options) {
1890
1897
  repoVariables: repoVariables,
1891
1898
  secrets: secrets,
1892
1899
  oidcCustomization: oidcCustomization,
1893
- requiredCommitSigning: requiredCommitSigning
1900
+ requiredCommitSigning: requiredCommitSigning,
1901
+ customProperties: customProperties
1894
1902
  }
1895
1903
  },
1896
1904
  output: {
@@ -1923,6 +1931,7 @@ function createGithubRepoCreateAction(options) {
1923
1931
  repoVariables,
1924
1932
  secrets,
1925
1933
  oidcCustomization,
1934
+ customProperties,
1926
1935
  token: providedToken
1927
1936
  } = ctx.input;
1928
1937
  const octokitOptions = await getOctokitOptions({
@@ -1959,6 +1968,7 @@ function createGithubRepoCreateAction(options) {
1959
1968
  repoVariables,
1960
1969
  secrets,
1961
1970
  oidcCustomization,
1971
+ customProperties,
1962
1972
  ctx.logger
1963
1973
  );
1964
1974
  ctx.output("remoteUrl", newRepo.clone_url);
@@ -3603,7 +3613,8 @@ function createPublishGithubAction(options) {
3603
3613
  repoVariables: repoVariables,
3604
3614
  secrets: secrets,
3605
3615
  oidcCustomization: oidcCustomization,
3606
- requiredCommitSigning: requiredCommitSigning
3616
+ requiredCommitSigning: requiredCommitSigning,
3617
+ customProperties: customProperties
3607
3618
  }
3608
3619
  },
3609
3620
  output: {
@@ -3653,6 +3664,7 @@ function createPublishGithubAction(options) {
3653
3664
  secrets,
3654
3665
  oidcCustomization,
3655
3666
  token: providedToken,
3667
+ customProperties,
3656
3668
  requiredCommitSigning = false
3657
3669
  } = ctx.input;
3658
3670
  const octokitOptions = await getOctokitOptions({
@@ -3689,6 +3701,7 @@ function createPublishGithubAction(options) {
3689
3701
  repoVariables,
3690
3702
  secrets,
3691
3703
  oidcCustomization,
3704
+ customProperties,
3692
3705
  ctx.logger
3693
3706
  );
3694
3707
  const remoteUrl = newRepo.clone_url;