diff --git a/.changeset/hungry-cycles-hide.md b/.changeset/hungry-cycles-hide.md index 22c6360c14..55a5179029 100644 --- a/.changeset/hungry-cycles-hide.md +++ b/.changeset/hungry-cycles-hide.md @@ -1,5 +1,5 @@ --- -'@backstage/plugin-scaffolder-backend-module-github': patch +'@backstage/plugin-scaffolder-backend-module-github': minor --- -Adds `createWhenEmpty` option to `publish:github:pull-request` action. +**BREAKING**: The `remoteUrl` output is no longer required, it can be empty only when using the new `createWhenEmpty` boolean flag. diff --git a/.changeset/thick-moose-do.md b/.changeset/thick-moose-do.md deleted file mode 100644 index eecf9c0333..0000000000 --- a/.changeset/thick-moose-do.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder-backend-module-github': patch ---- - -Added `oneOf` output schema to `publish:github:pull-request` scaffolder action to allow for non-breaking addition of `createWhenEmpty` option diff --git a/plugins/scaffolder-backend-module-github/src/actions/githubPullRequest.ts b/plugins/scaffolder-backend-module-github/src/actions/githubPullRequest.ts index f192b61e39..c9a1b3d1b5 100644 --- a/plugins/scaffolder-backend-module-github/src/actions/githubPullRequest.ts +++ b/plugins/scaffolder-backend-module-github/src/actions/githubPullRequest.ts @@ -261,48 +261,24 @@ export const createPublishGithubPullRequestAction = ( }, }, output: { - oneOf: [ - { - required: ['remoteUrl'], - type: 'object', - properties: { - targetBranchName: { - title: 'Target branch name of the merge request', - type: 'string', - }, - remoteUrl: { - type: 'string', - title: 'Pull Request URL', - description: 'Link to the pull request in Github', - }, - pullRequestNumber: { - type: 'number', - title: 'Pull Request Number', - description: 'The pull request number', - }, - }, + required: [], + type: 'object', + properties: { + targetBranchName: { + title: 'Target branch name of the merge request', + type: 'string', }, - { - required: [], - type: 'object', - properties: { - targetBranchName: { - title: 'Target branch name of the merge request', - type: 'string', - }, - remoteUrl: { - type: 'string', - title: 'Pull Request URL', - description: 'Link to the pull request in Github', - }, - pullRequestNumber: { - type: 'number', - title: 'Pull Request Number', - description: 'The pull request number', - }, - }, + remoteUrl: { + type: 'string', + title: 'Pull Request URL', + description: 'Link to the pull request in Github', }, - ], + pullRequestNumber: { + type: 'number', + title: 'Pull Request Number', + description: 'The pull request number', + }, + }, }, }, async handler(ctx) {