Automatically retarget merge requests [RUN ALL RSPEC] [RUN AS-IF-FOSS]
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
intomaster
- Merge Request B: merge
feature-B
intofeature-A
We can distinguish two workflows:
- the MR A is merged into
master
first, and then MR B is retargeted ontomaster
- the MR B is merged into
feature-A
branch, and then MR A is merged intomaster
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)
Does this MR meet the acceptance criteria?
Conformity
Edited by Kamil Trzciński (Back 2025-01-01)