Allow update to merge request settings via push options
What does this MR do and why?
Correctly identify any existing merge request for the source branch to the given target_branch
and target_project
, then update the options on the MR with the values provided by additional push options.
This solves an issue discovered during the development of !132475 (merged).
Screenshots or screen recordings
Screenshots omitted.
How to set up and validate locally
- Create project.
- Fork project.
- Clone forked project.
- Create new branch and commit changes.
- Run
git push origin HEAD -o merge_request.create -o merge_request.label=first-label
; noticefirst-label
on MR. - Create another commit on branch.
- Run
git push origin HEAD -o merge_request.label=second-label
; noticesecond-label
is missing from MR. - Apply this patch.
- Create another commit on branch.
- Run
git push origin HEAD -o merge_request.label=third-label
; noticethird-label
is added to MR.
Note: This issue only appears on merge requests to another project in the fork network. Merge requests from one branch to another in the same project already behave correctly.
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.