From 9f2e51e892b2e33aa4000dea2472c2faabdb09ff Mon Sep 17 00:00:00 2001 From: ebarrios Date: Fri, 19 Mar 2021 11:57:00 +0100 Subject: [PATCH 1/2] Changed repo visibility to === private for client.repos.createInOrg and added changeset Signed-off-by: ebarrios --- .changeset/blue-sheep-act.md | 5 +++++ .../src/scaffolder/actions/builtin/publish/github.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/blue-sheep-act.md diff --git a/.changeset/blue-sheep-act.md b/.changeset/blue-sheep-act.md new file mode 100644 index 0000000000..72d33a118f --- /dev/null +++ b/.changeset/blue-sheep-act.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder-backend': patch +--- + +Update visibility for create in repo function diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts index 4f9b6038a1..808d76c8cf 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts @@ -126,7 +126,7 @@ export function createPublishGithubAction(options: { ? client.repos.createInOrg({ name: repo, org: owner, - private: repoVisibility !== 'public', + private: repoVisibility === 'private', visibility: repoVisibility, description: description, }) From 532c88f0bbbceb90919ab812b39eac0cca60c1ee Mon Sep 17 00:00:00 2001 From: Esteban Barrios Date: Sat, 20 Mar 2021 11:57:11 +0100 Subject: [PATCH 2/2] Update .changeset/blue-sheep-act.md Co-authored-by: Johan Haals Signed-off-by: ebarrios --- .changeset/blue-sheep-act.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/blue-sheep-act.md b/.changeset/blue-sheep-act.md index 72d33a118f..bb13be229f 100644 --- a/.changeset/blue-sheep-act.md +++ b/.changeset/blue-sheep-act.md @@ -2,4 +2,4 @@ '@backstage/plugin-scaffolder-backend': patch --- -Update visibility for create in repo function +Fixes bug in the `github:publish` action causing repositories to be set as private even if the visibility is set to internal