Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Cannot trigger hook on pull request merge


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

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.


Kind Regards

0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

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...

3,920 views 10 16
Read article

Community Events

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

Events near you