Prevent pushes to a branch once an MR is on the Merge Train
Release notes
Problem to solve
When an MR is on the Merge Train, it's still possible to push new commits to it.
That's a problem since that makes the train derail, leading to new pipelines for all the MRs after it in the train.
Intended users
Merge request authors and maintainers.
User experience goal
The goal is to provide safer behavior for the Merge Train, with the end goal of reducing the time to merge a MR which is on the merge train.
Proposal
Prevent any Git pushes to a branch for which the MR is on the Merge Train.
Further details
Once Git pushes will be prevented, this will force the author to have a discussion with the maintainer on whether pushing a new commit is really necessary to go into this MR (i.e. making the Merge Train derail), or if it can go in a follow-up MR (i.e. not disturbing the Merge Train).
Permissions and Security
Git pushes should be prevented to any MR that is on the Merge Train. If a Git push is really needed, the MR should first be removed manually from the Merge Train.