How to create a webhook that triggers on Merge button

Hernando Gallego April 26, 2023

I am trying to create a why so my jenkins Pipeline gets triggered when the user hits the MERGE button on bitbucket.

 

Is there a way to achieve that? Seems like a Webhook might need to be developed but i cannot see proper payloads for that kind of data.

 

Thanks

2 answers

0 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 27, 2023

Hello @Hernando Gallego ,

Welcome to the Community!

Could you please let us know if your question concerns Bitbucket Cloud or Bitbucket Server? 

If it's Bitbucket Cloud, you can create a new webhook by accessing Repository Settings > Webhooks > Add webhook. While adding the new webhook you will be presented with all the available trigger options, where one of them is PullRequest:Merge.

The details of each trigger event and their respective payloads are available in the following documentation : 

Thank you, @Hernando Gallego!

Patrik S

0 votes
jennifer_dempsey_Appfire
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
April 26, 2023

Hi @Hernando Gallego -

You may want to consider evaluating a tool like Webhook to Jenkins for Bitbucket to help you achieve your goal. It will enable you to trigger a build in Jenkins when a Pull Request is merged.

You can reach out to our awesome support team to ask any questions you might have.

You can also email me at Jennifer.dempsey@appfire.com and I can put in contact with our PM to further discuss your needs and schedule a demo. We'd be happy to help you any time.

Warmly,

Jennifer Dempsey, Product Marketing Manager, Appfire

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events