How to make dependency between Merge Request status and webhook to Jenkins build?


So I have a git project on and I have a webhook on Merge Request that triggers build in my Jenkins. I want to make Merge Request unable to merge until that build success at Jenkins. How can I do that?

PS. I pressume that some may suggest, that I should use Gitlab-CI to build my project. Right now I really would like to focus only using a Jenkins for builds.