chore: revert the oneOf changes

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2025-02-11 14:47:33 +01:00
parent 817dfd1f86
commit 75617053fa
3 changed files with 18 additions and 47 deletions
+2 -2
View File
@@ -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.
-5
View File
@@ -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
@@ -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) {