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

Hello,

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
Laurent

0 answers

Suggest an answer

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

Powering DevOps with Bitbucket Server & Data Center

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

685 views 0 4
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