Merge Request merged to the wrong branch after dependency merged and target branch got reset to master
Summary
Merge request (MR 2) merged the changes to the wrong branch when:
- it had another MR as dependency (MR 1)
- it had auto-merge set before MR 1 merged
- it had target-branch set as the branch for MR1
As soon as MR1 merged:
- MR2 changed the target branch to master
- Merged changes to the MR 1 branch
- MR 1 branch got immediately deleted
Steps to reproduce
Example Project
This was MR 1: !151943 (merged)
This was MR 2 (with MR1 as depedency): !151965 (merged)
What is the current bug behavior?
Changes get merged to the old branch.
What is the expected correct behavior?
Changes get merged to the new branch after retargetting.
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com