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.
Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster ! While we’re all excited about the new improvements to Bitbucket ...
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