Feature/Bug: Push to refs/merge-requests/ID/head works, but does nothing
Summary
Fetch a merge-request by running git fetch origin refs/merge-requests/ID/head:amr
, rebase and push using git push origin --force HEAD:refs/merge-requests/ID/head
(SSH route).
Push succeeds, however, the MR is not updated.
Steps to reproduce
Described above.
What is the current bug behavior?
The force push is accepted.
What is the expected correct behavior?
It depends: I wish a MR creator could mark a merge request as "modifydable by project maintainers" so that I can rebase and modify a MR before merging (cf. https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/). If that flag is not set: The push attempt should fail.
Results of GitLab environment info
Happens on GitLab.com, I cannot provide this info.
Possible fixes
The force push must fail as long as the MR requester hasn't given permission to edit the MR.