Warn/error about locked files in merge request
Problem to solve
The Merge button in merge request just spins forever if the MR contains disallowed changes to locked files
Further details
File locks affect only the default branch, any developer is allowed to push changes to locked files in other branches. They can then create a merge request with the default branch as target. Accepting the MR now raises a question: should the changes be allowed, even if the person accepting the MR was the one who placed the lock?
In my experience, at least with the "squash commits" option enabled, and a MR acceptor who's not the lock owner, pressing the "Merge" button just results in a long wait and nothing happening.
Proposal
-
When a merge cannot be done because it affects locked files, there should be a clear error message.
-
If changes were done to locked files by the lock owner, they should be allowed to merge, even if commits are squashed and assigned to another developer.
-
Preferably, whenever there are changes to locked files not done by the lock owner, the owner should get a notification and the chance to approve/reject them.