Skip to content

Automatically retarget merge requests [RUN ALL RSPEC] [RUN AS-IF-FOSS]

Kamil Trzciński (Back 2025-01-01) requested to merge retarget-branch into master

What does this MR do?

It is common to have a number of merge requests in a chain, when one depends on another. For example:

  • Merge Request A: merge feature-A into master
  • Merge Request B: merge feature-B into feature-A

We can distinguish two workflows:

  • the MR A is merged into master first, and then MR B is retargeted onto master
  • the MR B is merged into feature-A branch, and then MR A is merged into master

Upon merge of MR A does automatically retarget the MR B onto master. This relieves user from having to perform this operation manually.

This feature works only in following cases:

  • The MR A needs to be in a main project (forks not supported), as we GitLab is cannot change target project of MR B
  • The MR A deletes branch on merge
  • Only 4 MR's of type B are retargeted automatically this way
  • A note of changing target branch is created automatically by system.

Related to: #320902 (closed).

Screenshots (strongly suggested)

Screenshot_2021-02-12_at_12.39.21

Does this MR meet the acceptance criteria?

Conformity

Edited by Kamil Trzciński (Back 2025-01-01)

Merge request reports

Loading