Require merge request to be up-to-date before merging
Problem to solve
On GitHub there is the possibility to disable merging of MRs when they are out of date with the base branch.
This helps in situations when you have something like this.
4 feature branches and one target branch. Each and every branch has successful pipeline. You start merging all of them. After all of them are merged, you try to start pipeline. And it fails. And you don't even understand which branch broke your target branch.
As a guy who is responsible for merging MRs, I want to have restrictions when there is diff between source and target branch, so I can be sure that the branch will not break target branch.
Intended users
Release Manager
User experience goal
The release manager should be able to UI with GitLab to disallow merging MRs that have diff with target branch
Proposal
- Settings -> General -> Merge Requests -> add checkbox that says something "disallow merging when there is diff between source and target branch"
- Merge Requests -> concrete merge request -> when there is "The source branch is 176 commits behind the target branch" "Merge" button is the same as when pipeline failed (disallowed and grey)
Permissions and Security
- Changing the setting of this can be done by the person who has access to repository settings.
- The merging is disabled to all of the members when there is diff
Documentation
no extra documentation needed
Availability & Testing
Available Tier
- Free
What does success look like, and how can we measure that?
Can be get from previous questions
Links / references
old repository issue gitlab-foss#42554 (closed)