I want to trigger a pre-receive hook when I merge a pull-request from Bitbucket server web interface.
I setup "Yet Another Commit Checker", on Bitbucket server 5.9.0 and 6.6.2 to reject commits that do not contain a specific word ("zorro", don't judge me, it's a test).
The hook is triggered when I push from a clone to the server. That's OK.
The hook is not triggered when I click "Merge" to merge a Pull Request (merge strategy is no-ff: a new commit is created).
If I create the Pull request, merge the commits in a clone and push, the hook is triggered.
The Bitbucket UI states (in repo settings/hooks):
Pre receive hooks allow you to control which commits go into your repository before pushes are committed or pull requests are merged.
I cannot find anything in the logs of the server (help to tune them could be appreciated).
Bitbucket behaves like if the above sentence is wrong and hooks trigger only on push from a clone.
What did I do wrong? Is there a hidden option to enable?
Webhook is not an option for now.
Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events