Skip to content

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

  1. Create project.
  2. Fork project.
  3. Clone forked project.
  4. Create new branch and commit changes.
  5. Run git push origin HEAD -o merge_request.create -o merge_request.label=first-label; notice first-label on MR.
  6. Create another commit on branch.
  7. Run git push origin HEAD -o merge_request.label=second-label; notice second-label is missing from MR.
  8. Apply this patch.
  9. Create another commit on branch.
  10. Run git push origin HEAD -o merge_request.label=third-label; notice third-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.

Merge request reports

Loading