Add API to bulk merge MR list in monorepo mode
Related issue: https://jihulab.com/gitlab-cn/gitlab/-/issues/3147 | Dependent MR: Add API to query MR list in monorepo mode
What does this MR do and why?
Add an API to bulk merge MR list in monorepo mode
POST /{project_path}/-/merge_requests/{mr_id}/bulk_merge
Screenshots or screen recordings
When user clicks 全部合并
, this new API will be requested.
How to set up and validate locally
-
Turn on feature flag. And make sure there is already a valid ~"GitLab Premium"
Feature.enable(:ff_monorepo)
-
Under the same Group, create multiple Projects
-
Create an MR in each Project, and these MRs meet the following conditions
- have the same source_branch
- have
monorepo
label
-
Call this new API:
PROJECT_PATH=flightjs/Flight MERGE_REQUEST_ID=24 YOUR_COOKIES_FROM_BROWSER='...' curl --location --request POST 'http://127.0.0.1:3000/$PROJECT_PATH/-/merge_requests/$MERGE_REQUEST_ID/bulk_merge' \ --header 'Cookie: $YOUR_COOKIES_FROM_BROWSER' \ --data ''
-
Refresh the page of a single MR and expect to see that the MR is being merged and then merged.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
由 路志远 编辑于