From 829e5015c4280e18a17cc1e8f7c466e0a3e07899 Mon Sep 17 00:00:00 2001 From: Hghtwr Date: Fri, 31 Jan 2025 15:13:36 +0100 Subject: [PATCH 1/7] implement try catch for gitlab premium feature, implement conditional for automatic mr reviewer assignment Signed-off-by: Hghtwr --- .../src/actions/gitlabMergeRequest.ts | 126 ++++++++++++------ 1 file changed, 86 insertions(+), 40 deletions(-) diff --git a/plugins/scaffolder-backend-module-gitlab/src/actions/gitlabMergeRequest.ts b/plugins/scaffolder-backend-module-gitlab/src/actions/gitlabMergeRequest.ts index 607a904d0a..c09659194d 100644 --- a/plugins/scaffolder-backend-module-gitlab/src/actions/gitlabMergeRequest.ts +++ b/plugins/scaffolder-backend-module-gitlab/src/actions/gitlabMergeRequest.ts @@ -25,6 +25,8 @@ import { RepositoryTreeSchema, CommitAction, SimpleUserSchema, + ExpandedMergeRequestSchema, + Camelize, } from '@gitbeaker/rest'; import path from 'path'; import { ScmIntegrationRegistry } from '@backstage/integration'; @@ -81,6 +83,56 @@ async function getFileAction( return defaultCommitAction; } +async function getReviewersFromApprovalRules( + api: InstanceType, + mergerequestIId: number, + repoID: string, + ctx: any, +): Promise { + try { + // Because we don't know the code owners before the MR is created, we can't check the approval rules beforehand. + // Getting the approval rules beforehand is very difficult, especially, because of the inheritance rules for groups. + // Code owners take a moment to be processed and added to the approval rules after the MR is created. + + let mergeRequest: + | ExpandedMergeRequestSchema + | Camelize = await api.MergeRequests.show( + repoID, + mergerequestIId, + ); + + while ( + mergeRequest.detailed_merge_status === 'preparing' || + mergeRequest.detailed_merge_status === 'approvals_syncing' || + mergeRequest.detailed_merge_status === 'checking' + ) { + mergeRequest = await api.MergeRequests.show(repoID, mergeRequest.iid); + ctx.logger.info(`${mergeRequest.detailed_merge_status}`); + } + + const approvalRules = await api.MergeRequestApprovals.allApprovalRules( + repoID, + { + mergerequestIId: mergeRequest.iid, + }, + ); + return approvalRules + .filter(rule => rule.eligible_approvers !== undefined) + .map(rule => { + return rule.eligible_approvers as SimpleUserSchema[]; + }) + .flat() + .map(user => user.id); + } catch (e) { + ctx.logger.warn( + `Failed to retrieve approval rules for MR ${mergerequestIId}: ${getErrorMessage( + e, + )}. Proceeding with MR creation without reviewers from approval rules.`, + ); + return []; + } +} + /** * Create a new action that creates a gitlab merge request. * @@ -106,6 +158,7 @@ export const createPublishGitlabMergeRequestAction = (options: { removeSourceBranch?: boolean; assignee?: string; reviewers?: string[]; + assignReviewersFromApprovalRules?: boolean; }>({ id: 'publish:gitlab:merge-request', examples, @@ -193,6 +246,12 @@ which uses additional API calls in order to detect whether to 'create', 'update' }, description: 'Users that will be assigned as reviewers', }, + assignReviewersFromApprovalRules: { + title: 'Assign reviewers from approval rules', + type: 'boolean', + description: + 'Automatically assign reviewers from the approval rules of the MR. Includes Codeowners', + }, }, }, output: { @@ -404,48 +463,35 @@ which uses additional API calls in order to detect whether to 'create', 'update' }, ); - // Because we don't know the code owners before the MR is created, we can't check the approval rules beforehand. - // Getting the approval rules beforehand is very difficult, especially, because of the inheritance rules for groups. - // Code owners take a moment to be processed and added to the approval rules after the MR is created. + if (ctx.input.assignReviewersFromApprovalRules) { + try { + const reviewersFromApprovalRules = + await getReviewersFromApprovalRules( + api, + mergeRequest.iid, + repoID, + ctx, + ); + const eligibleUserIds = new Set([ + ...reviewersFromApprovalRules, + ...(reviewerIds ?? []), + ]); - while ( - mergeRequest.detailed_merge_status === 'preparing' || - mergeRequest.detailed_merge_status === 'approvals_syncing' || - mergeRequest.detailed_merge_status === 'checking' - ) { - mergeRequest = await api.MergeRequests.show(repoID, mergeRequest.iid); - ctx.logger.info(`${mergeRequest.detailed_merge_status}`); + mergeRequest = await api.MergeRequests.edit( + repoID, + mergeRequest.iid, + { + reviewerIds: Array.from(eligibleUserIds), + }, + ); + } catch (e) { + ctx.logger.warn( + `Failed to assign reviewers from approval rules: ${getErrorMessage( + e, + )}`, + ); + } } - - const approvalRules = await api.MergeRequestApprovals.allApprovalRules( - repoID, - { - mergerequestIId: mergeRequest.iid, - }, - ); - - if (approvalRules.length !== 0) { - const eligibleApprovers = approvalRules - .filter(rule => rule.eligible_approvers !== undefined) - .map(rule => { - return rule.eligible_approvers as SimpleUserSchema[]; - }) - .flat(); - - const eligibleUserIds = new Set([ - ...eligibleApprovers.map(user => user.id), - ...(reviewerIds ?? []), - ]); - - mergeRequest = await api.MergeRequests.edit( - repoID, - mergeRequest.iid, - { - reviewerIds: Array.from(eligibleUserIds), - }, - ); - } - ctx.output('projectid', repoID); ctx.output('targetBranchName', targetBranch); ctx.output('projectPath', repoID); From 9d04e91133cc108e10a4b645d3e3948b280abec5 Mon Sep 17 00:00:00 2001 From: Hghtwr Date: Sun, 2 Feb 2025 12:02:50 +0100 Subject: [PATCH 2/7] Fix automated assignment of reviewers for instances without premium/ultimate license (404). Introduce opt-in flag for automatic reviewer assignment based on approval rules Signed-off-by: Hghtwr --- .changeset/few-ducks-cross.md | 5 + .../src/actions/gitlabMergeRequest.test.ts | 98 +++++++++++++++++-- .../src/actions/gitlabMergeRequest.ts | 27 ++--- 3 files changed, 110 insertions(+), 20 deletions(-) create mode 100644 .changeset/few-ducks-cross.md diff --git a/.changeset/few-ducks-cross.md b/.changeset/few-ducks-cross.md new file mode 100644 index 0000000000..8f1bc15e15 --- /dev/null +++ b/.changeset/few-ducks-cross.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder-backend-module-gitlab': patch +--- + +Fix automated assignment of reviewers for instances without premium/ultimate license (404). Introduce opt-in flag for automatic reviewer assignment based on approval rules diff --git a/plugins/scaffolder-backend-module-gitlab/src/actions/gitlabMergeRequest.test.ts b/plugins/scaffolder-backend-module-gitlab/src/actions/gitlabMergeRequest.test.ts index 874764b5ba..08194b52cc 100644 --- a/plugins/scaffolder-backend-module-gitlab/src/actions/gitlabMergeRequest.test.ts +++ b/plugins/scaffolder-backend-module-gitlab/src/actions/gitlabMergeRequest.test.ts @@ -52,6 +52,11 @@ const mockGitlabClient = { }, MergeRequests: { create: jest.fn(async (repoId: string) => { + if (repoId === 'owner/repo-without-approval-rule-license') { + return { + iid: 6, + }; + } if (repoId === 'owner/repo-without-approvals') { return { iid: 5, @@ -63,6 +68,11 @@ const mockGitlabClient = { }; }), show: jest.fn(async (repoId: string, iid: number) => { + if (repoId === 'owner/repo-without-approval-rule-license' && iid === 6) { + return { + iid: 6, + }; + } if (repoId === 'owner/repo' && iid === 4) { return { iid: 4, @@ -91,6 +101,16 @@ const mockGitlabClient = { ) { return []; } + if ( + repoId === 'owner/repo-without-approval-rule-license' && + options.mergerequestIId === 6 + ) { + throw new Error('Not Found', { + cause: { + description: '404 Not found', + }, + }); + } return [ { id: 123, @@ -608,7 +628,7 @@ describe('createGitLabMergeRequest', () => { }); describe('createGitlabMergeRequestWithReviewers', () => { - it('no reviewers are set when a no reviewer are passed in options', async () => { + it('no dedicated reviewers are set when a no reviewer are passed in options but mr approval reviewers are set when flag activated', async () => { const input = { repoUrl: 'gitlab.com?repo=repo&owner=owner', title: 'Create my new MR', @@ -617,6 +637,7 @@ describe('createGitLabMergeRequest', () => { removeSourceBranch: false, targetPath: 'Subdirectory', assignee: 'John Smith', + assignReviewersFromApprovalRules: true, }; mockDir.setContent({ [workspacePath]: { @@ -667,6 +688,7 @@ describe('createGitLabMergeRequest', () => { targetPath: 'Subdirectory', assignee: 'John Smith', reviewers: ['Jane Doe', 'Bob Vance'], + assignReviewersFromApprovalRules: true, }; mockDir.setContent({ [workspacePath]: { @@ -708,7 +730,53 @@ describe('createGitLabMergeRequest', () => { ); }); - it('reviewer is set correcly when a valid reviewer username is passed in options and no MR rules exist', async () => { + it('reviewer is set correcly when a valid reviewer username is passed in options in combination with deactivated approval rules', async () => { + const input = { + repoUrl: 'gitlab.com?repo=repo&owner=owner', + title: 'Create my new MR', + branchName: 'new-mr', + description: 'This is an important change', + removeSourceBranch: false, + targetPath: 'Subdirectory', + assignee: 'John Smith', + reviewers: ['Jane Doe', 'Bob Vance'], + assignReviewersFromApprovalRules: false, + }; + mockDir.setContent({ + [workspacePath]: { + source: { 'foo.txt': 'Hello there!' }, + irrelevant: { 'bar.txt': 'Nothing to see here' }, + }, + }); + + const ctx = createMockActionContext({ input, workspacePath }); + await instance.handler(ctx); + + expect(mockGitlabClient.Branches.create).toHaveBeenCalledWith( + 'owner/repo', + 'new-mr', + 'main', + ); + expect(mockGitlabClient.Commits.create).not.toHaveBeenCalled(); + expect(mockGitlabClient.MergeRequests.create).toHaveBeenCalledWith( + 'owner/repo', + 'new-mr', + 'main', + 'Create my new MR', + { + description: 'This is an important change', + removeSourceBranch: false, + assigneeId: 123, + reviewerIds: [456, 234], // Jane Doe and Bob Vance + }, + ); + expect( + mockGitlabClient.MergeRequestApprovals.allApprovalRules, + ).not.toHaveBeenCalled(); + expect(mockGitlabClient.MergeRequests.edit).not.toHaveBeenCalled(); + }); + + it('reviewer is set correctly when a valid reviewer username is passed in options and no MR rules exist and approval rules are activated', async () => { const input = { repoUrl: 'gitlab.com?repo=repo-without-approvals&owner=owner', title: 'Create my new MR', @@ -718,6 +786,7 @@ describe('createGitLabMergeRequest', () => { targetPath: 'Subdirectory', assignee: 'John Smith', reviewers: ['Jane Doe', 'Bob Vance'], + assignReviewersFromApprovalRules: true, }; mockDir.setContent({ [workspacePath]: { @@ -755,16 +824,18 @@ describe('createGitLabMergeRequest', () => { expect(mockGitlabClient.MergeRequests.edit).not.toHaveBeenCalled(); }); - it('reviewers are set correcly when valid reviewers username are passed in options', async () => { + it('reviewer is set correcly when a valid reviewer username is passed in options and MR rules are not included in the Gitlab license (404)', async () => { const input = { - repoUrl: 'gitlab.com?repo=repo&owner=owner', + repoUrl: + 'gitlab.com?repo=repo-without-approval-rule-license&owner=owner', title: 'Create my new MR', branchName: 'new-mr', description: 'This is an important change', removeSourceBranch: false, targetPath: 'Subdirectory', assignee: 'John Smith', - reviewers: ['Jane Doe', 'John Smith'], + reviewers: ['Jane Doe', 'Bob Vance'], + assignReviewersFromApprovalRules: true, }; mockDir.setContent({ [workspacePath]: { @@ -774,16 +845,17 @@ describe('createGitLabMergeRequest', () => { }); const ctx = createMockActionContext({ input, workspacePath }); + ctx.logger.warn = jest.fn(); await instance.handler(ctx); expect(mockGitlabClient.Branches.create).toHaveBeenCalledWith( - 'owner/repo', + 'owner/repo-without-approval-rule-license', 'new-mr', 'main', ); expect(mockGitlabClient.Commits.create).not.toHaveBeenCalled(); expect(mockGitlabClient.MergeRequests.create).toHaveBeenCalledWith( - 'owner/repo', + 'owner/repo-without-approval-rule-license', 'new-mr', 'main', 'Create my new MR', @@ -791,9 +863,19 @@ describe('createGitLabMergeRequest', () => { description: 'This is an important change', removeSourceBranch: false, assigneeId: 123, - reviewerIds: [456, 123], + reviewerIds: [456, 234], // Jane Doe and Bob Vance }, ); + expect( + mockGitlabClient.MergeRequestApprovals.allApprovalRules, + ).toHaveBeenCalledWith('owner/repo-without-approval-rule-license', { + mergerequestIId: 6, + }); + expect(mockGitlabClient.MergeRequests.edit).not.toHaveBeenCalled(); + expect(ctx.logger.warn).toHaveBeenCalledWith( + 'Failed to retrieve approval rules for MR 6: Error: Not Found. Proceeding with MR creation without reviewers from approval rules.', + ); + expect(ctx.output).toHaveBeenCalledWith('targetBranchName', 'main'); // This ensures that the MR scaffolder step finishes successfully and all errors are catched. }); it('assignee is not set when a valid assignee username is not passed in options', async () => { diff --git a/plugins/scaffolder-backend-module-gitlab/src/actions/gitlabMergeRequest.ts b/plugins/scaffolder-backend-module-gitlab/src/actions/gitlabMergeRequest.ts index c09659194d..26f7eff4ce 100644 --- a/plugins/scaffolder-backend-module-gitlab/src/actions/gitlabMergeRequest.ts +++ b/plugins/scaffolder-backend-module-gitlab/src/actions/gitlabMergeRequest.ts @@ -116,6 +116,7 @@ async function getReviewersFromApprovalRules( mergerequestIId: mergeRequest.iid, }, ); + return approvalRules .filter(rule => rule.eligible_approvers !== undefined) .map(rule => { @@ -472,23 +473,25 @@ which uses additional API calls in order to detect whether to 'create', 'update' repoID, ctx, ); - const eligibleUserIds = new Set([ - ...reviewersFromApprovalRules, - ...(reviewerIds ?? []), - ]); + if (reviewersFromApprovalRules.length > 0) { + const eligibleUserIds = new Set([ + ...reviewersFromApprovalRules, + ...(reviewerIds ?? []), + ]); - mergeRequest = await api.MergeRequests.edit( - repoID, - mergeRequest.iid, - { - reviewerIds: Array.from(eligibleUserIds), - }, - ); + mergeRequest = await api.MergeRequests.edit( + repoID, + mergeRequest.iid, + { + reviewerIds: Array.from(eligibleUserIds), + }, + ); + } } catch (e) { ctx.logger.warn( `Failed to assign reviewers from approval rules: ${getErrorMessage( e, - )}`, + )}.`, ); } } From b3835d5b50181f67472c11a6d9bb83f8e75274a0 Mon Sep 17 00:00:00 2001 From: Hghtwr Date: Sun, 2 Feb 2025 13:50:42 +0100 Subject: [PATCH 3/7] update api report Signed-off-by: Hghtwr --- .../report.api.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/plugins/scaffolder-backend-module-gitlab/report.api.md b/plugins/scaffolder-backend-module-gitlab/report.api.md index 6d4c4bad30..26cbd1f338 100644 --- a/plugins/scaffolder-backend-module-gitlab/report.api.md +++ b/plugins/scaffolder-backend-module-gitlab/report.api.md @@ -39,11 +39,11 @@ export const createGitlabIssueAction: (options: { projectId: number; labels?: string | undefined; description?: string | undefined; - weight?: number | undefined; token?: string | undefined; + weight?: number | undefined; assignees?: number[] | undefined; - createdAt?: string | undefined; confidential?: boolean | undefined; + createdAt?: string | undefined; milestoneId?: number | undefined; epicId?: number | undefined; dueDate?: string | undefined; @@ -67,8 +67,8 @@ export const createGitlabProjectAccessTokenAction: (options: { projectId: string | number; name?: string | undefined; token?: string | undefined; - scopes?: string[] | undefined; expiresAt?: string | undefined; + scopes?: string[] | undefined; accessLevel?: number | undefined; }, { @@ -82,8 +82,8 @@ export const createGitlabProjectDeployTokenAction: (options: { }) => TemplateAction< { name: string; - scopes: string[]; repoUrl: string; + scopes: string[]; projectId: string | number; username?: string | undefined; token?: string | undefined; @@ -124,7 +124,7 @@ export const createGitlabRepoPushAction: (options: { sourcePath?: string | undefined; targetPath?: string | undefined; token?: string | undefined; - commitAction?: 'update' | 'delete' | 'create' | undefined; + commitAction?: 'update' | 'create' | 'delete' | undefined; }, JsonObject >; @@ -205,11 +205,12 @@ export const createPublishGitlabMergeRequestAction: (options: { sourcePath?: string | undefined; targetPath?: string | undefined; token?: string | undefined; - commitAction?: 'auto' | 'update' | 'delete' | 'create' | 'skip' | undefined; + commitAction?: 'auto' | 'update' | 'skip' | 'create' | 'delete' | undefined; projectid?: string | undefined; removeSourceBranch?: boolean | undefined; assignee?: string | undefined; reviewers?: string[] | undefined; + assignReviewersFromApprovalRules?: boolean | undefined; }, JsonObject >; @@ -219,8 +220,8 @@ export const createTriggerGitlabPipelineAction: (options: { integrations: ScmIntegrationRegistry; }) => TemplateAction< { - branch: string; repoUrl: string; + branch: string; projectId: number; tokenDescription: string; token?: string | undefined; @@ -242,8 +243,8 @@ export const editGitlabIssueAction: (options: { title?: string | undefined; labels?: string | undefined; description?: string | undefined; - weight?: number | undefined; token?: string | undefined; + weight?: number | undefined; assignees?: number[] | undefined; addLabels?: string | undefined; confidential?: boolean | undefined; From d764b19a8ac3eb8df57e35ceb165bb3ca0fe7727 Mon Sep 17 00:00:00 2001 From: Hghtwr Date: Sun, 2 Feb 2025 14:28:11 +0100 Subject: [PATCH 4/7] fix api report Signed-off-by: Hghtwr --- .../report.api.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/plugins/scaffolder-backend-module-gitlab/report.api.md b/plugins/scaffolder-backend-module-gitlab/report.api.md index 26cbd1f338..6d4c4bad30 100644 --- a/plugins/scaffolder-backend-module-gitlab/report.api.md +++ b/plugins/scaffolder-backend-module-gitlab/report.api.md @@ -39,11 +39,11 @@ export const createGitlabIssueAction: (options: { projectId: number; labels?: string | undefined; description?: string | undefined; - token?: string | undefined; weight?: number | undefined; + token?: string | undefined; assignees?: number[] | undefined; - confidential?: boolean | undefined; createdAt?: string | undefined; + confidential?: boolean | undefined; milestoneId?: number | undefined; epicId?: number | undefined; dueDate?: string | undefined; @@ -67,8 +67,8 @@ export const createGitlabProjectAccessTokenAction: (options: { projectId: string | number; name?: string | undefined; token?: string | undefined; - expiresAt?: string | undefined; scopes?: string[] | undefined; + expiresAt?: string | undefined; accessLevel?: number | undefined; }, { @@ -82,8 +82,8 @@ export const createGitlabProjectDeployTokenAction: (options: { }) => TemplateAction< { name: string; - repoUrl: string; scopes: string[]; + repoUrl: string; projectId: string | number; username?: string | undefined; token?: string | undefined; @@ -124,7 +124,7 @@ export const createGitlabRepoPushAction: (options: { sourcePath?: string | undefined; targetPath?: string | undefined; token?: string | undefined; - commitAction?: 'update' | 'create' | 'delete' | undefined; + commitAction?: 'update' | 'delete' | 'create' | undefined; }, JsonObject >; @@ -205,12 +205,11 @@ export const createPublishGitlabMergeRequestAction: (options: { sourcePath?: string | undefined; targetPath?: string | undefined; token?: string | undefined; - commitAction?: 'auto' | 'update' | 'skip' | 'create' | 'delete' | undefined; + commitAction?: 'auto' | 'update' | 'delete' | 'create' | 'skip' | undefined; projectid?: string | undefined; removeSourceBranch?: boolean | undefined; assignee?: string | undefined; reviewers?: string[] | undefined; - assignReviewersFromApprovalRules?: boolean | undefined; }, JsonObject >; @@ -220,8 +219,8 @@ export const createTriggerGitlabPipelineAction: (options: { integrations: ScmIntegrationRegistry; }) => TemplateAction< { - repoUrl: string; branch: string; + repoUrl: string; projectId: number; tokenDescription: string; token?: string | undefined; @@ -243,8 +242,8 @@ export const editGitlabIssueAction: (options: { title?: string | undefined; labels?: string | undefined; description?: string | undefined; - token?: string | undefined; weight?: number | undefined; + token?: string | undefined; assignees?: number[] | undefined; addLabels?: string | undefined; confidential?: boolean | undefined; From f2d7fa5021b9ad27e48fbf381ba6d9fef88cea71 Mon Sep 17 00:00:00 2001 From: Hghtwr Date: Sun, 2 Feb 2025 14:29:50 +0100 Subject: [PATCH 5/7] fix api report Signed-off-by: Hghtwr --- plugins/scaffolder-backend-module-gitlab/report.api.md | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/scaffolder-backend-module-gitlab/report.api.md b/plugins/scaffolder-backend-module-gitlab/report.api.md index 6d4c4bad30..aae92a0278 100644 --- a/plugins/scaffolder-backend-module-gitlab/report.api.md +++ b/plugins/scaffolder-backend-module-gitlab/report.api.md @@ -210,6 +210,7 @@ export const createPublishGitlabMergeRequestAction: (options: { removeSourceBranch?: boolean | undefined; assignee?: string | undefined; reviewers?: string[] | undefined; + assignReviewersFromApprovalRules?: boolean | undefined; }, JsonObject >; From ae4b31b7fd16ea2f351e1a98f0e3d86ad8c69d01 Mon Sep 17 00:00:00 2001 From: Hghtwr Date: Sun, 2 Feb 2025 16:17:00 +0100 Subject: [PATCH 6/7] update api report Signed-off-by: Hghtwr --- plugins/scaffolder-backend/report.api.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/scaffolder-backend/report.api.md b/plugins/scaffolder-backend/report.api.md index b542cb1c94..c40b063432 100644 --- a/plugins/scaffolder-backend/report.api.md +++ b/plugins/scaffolder-backend/report.api.md @@ -355,11 +355,12 @@ export const createPublishGitlabMergeRequestAction: (options: { sourcePath?: string | undefined; targetPath?: string | undefined; token?: string | undefined; - commitAction?: 'auto' | 'update' | 'delete' | 'create' | 'skip' | undefined; + commitAction?: 'auto' | 'update' | 'skip' | 'delete' | 'create' | undefined; projectid?: string | undefined; removeSourceBranch?: boolean | undefined; assignee?: string | undefined; reviewers?: string[] | undefined; + assignReviewersFromApprovalRules?: boolean | undefined; }, JsonObject >; From 2c01023626c0b6e1fa309ba33be857822a209109 Mon Sep 17 00:00:00 2001 From: Hghtwr Date: Sun, 2 Feb 2025 16:27:59 +0100 Subject: [PATCH 7/7] update api report Signed-off-by: Hghtwr --- plugins/scaffolder-backend/report.api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/scaffolder-backend/report.api.md b/plugins/scaffolder-backend/report.api.md index c40b063432..f21bcd76f7 100644 --- a/plugins/scaffolder-backend/report.api.md +++ b/plugins/scaffolder-backend/report.api.md @@ -355,7 +355,7 @@ export const createPublishGitlabMergeRequestAction: (options: { sourcePath?: string | undefined; targetPath?: string | undefined; token?: string | undefined; - commitAction?: 'auto' | 'update' | 'skip' | 'delete' | 'create' | undefined; + commitAction?: 'auto' | 'update' | 'delete' | 'create' | 'skip' | undefined; projectid?: string | undefined; removeSourceBranch?: boolean | undefined; assignee?: string | undefined;