Don't mark empty MRs as merged on push to the target branch
What does this MR do?
When we're marking MRs as closed due to a push, don't do that if they were already empty. More reasoning at https://gitlab.com/gitlab-org/gitlab-ce/issues/32800#note_32422553 and in the commit message.
Are there points in the code the reviewer needs to double check?
I don't really like this spec file, but I don't want to refactor it all now
Why was this MR needed?
Creating an MR from an issue on a high-traffic repo like this one was really annoying.
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/32800.