Update GitLab MR Action to allow source branch to be deleted on merge
Signed-off-by: Aisha Saini <asaini1@jaguarlandrover.com> Signed-off-by: asaini1 <asaini1@jaguarlandrover.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder-backend': minor
|
||||
---
|
||||
|
||||
Update GitLab Merge Request Action to allow source branch to be deleted
|
||||
+11
-1
@@ -42,6 +42,7 @@ export const createPublishGitlabMergeRequestAction = (options: {
|
||||
token?: string;
|
||||
/** @deprecated Use projectPath instead */
|
||||
projectid?: string;
|
||||
removeSourceBranch?: boolean;
|
||||
}>({
|
||||
id: 'publish:gitlab:merge-request',
|
||||
schema: {
|
||||
@@ -85,6 +86,12 @@ export const createPublishGitlabMergeRequestAction = (options: {
|
||||
type: 'string',
|
||||
description: 'The token to use for authorization to GitLab',
|
||||
},
|
||||
removeSourceBranch: {
|
||||
title: 'Delete source branch',
|
||||
type: 'boolean',
|
||||
description:
|
||||
'Option to delete source branch once the MR has been merged. Default: false',
|
||||
},
|
||||
},
|
||||
},
|
||||
output: {
|
||||
@@ -187,7 +194,10 @@ export const createPublishGitlabMergeRequestAction = (options: {
|
||||
destinationBranch,
|
||||
String(defaultBranch),
|
||||
ctx.input.title,
|
||||
{ description: ctx.input.description },
|
||||
{
|
||||
description: ctx.input.description,
|
||||
removeSourceBranch: ctx.input.removeSourceBranch,
|
||||
},
|
||||
).then((mergeRequest: { web_url: string }) => {
|
||||
return mergeRequest.web_url;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user