Can merge request be merged - pre flight check
Description
Currently when you use server side hooks which make the merge fail it is only presented after you klick the "accept merge" button.
In our use case we enforce some code policies in this stage - for example a feature merge request has to be squashed to one commit. In the current situation, the person who accepts the merge is the only one who sees the error message. So the person who originally wrote the merge request is not aware of the problem.
Of course we could add a job in the CI - but this would lead to a failing test - which in this context is not true. And our developers like to have green tests - so the tend to squash each and every commit - which is not best practice.
Proposal
It should be possible to add custom hooks to the pre-flight check - like the information if the merge can be merged or is conflicting.
Links / references
http://stackoverflow.com/questions/42859025/can-merge-request-be-merged-custom-check-in-gitlab

