Hello, Atlassian community!
I'm trying to add a successful build restriction for merging pull request. If I get it right, the idea is when one presses merge button (which is clickable after reviewers have approved it) that action triggers, for example, jenkins job and if it is successful, performs the merge, otherwise tells you it wasn't performed due to build failure.
My current setup (integration) with jenkins involves web-hooks to triggers jobs, I'm aware about event payloads and stuff, but cant find anything related to the example I provided above - does it work on the same principle? where do I specify what job to trigger? For example, I couldnt find any relevant event for that over here - https://confluence.atlassian.com/bitbucketserver0514/using-bitbucket-server/managing-webhooks-in-bitbucket-server/event-payload?utm_campaign=in-app-help&utm_medium=in-app-help&utm_source=stash#Eventpayload-repositoryevents. Merged event looks like the one that happens on completed merge, which is not what Im looking for.
Looking for more detailed explanation/guide.