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

Cannot trigger hook on pull request merge

Laurent Boivin Pro June 30, 2020

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

1 answer

0 votes
Aaron Mailhot September 1, 2023

(apologies that this is a '+1' post rather than an answer, I didn't know how else to flag it)
===
Can we please get a response on this issue? I am seeing the same problem in my rather large organization (specifically using BitBucket Server 7.21)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events