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

Auto merge pull request (Jira-Bitbucket)

Hi, best regards:

im very new on this topics, i need to know if are some way to prepare an script that run automatically the Pull request (from BitBucket)  attached in the JIRA ticket, when some user changes the ticket (jira) status to "in progress"

Would someone be so kind to help me? I don't know where to start

I hope all of you can understand me.

Again, best regards.


1 answer

0 votes

Hello Christian,

Welcome to Atlassian Community!

Per your description, I believe you are looking for a way to trigger a script that will merge a pull request in your Bitbucket instance once your Jira issue is transitioned. Is that correct?

If that's what you want, you will need to perform two steps:

1 - Create a script that will send a POST call to the Stash API

2 - Configure your Jira workflow with the post-function "Trigger a Webhook" in the transitions that lead to the status "In progress", in order to get the Script started.

You can check both documentations below to know how you can configure the rest API call in the script and the Post function webhook:

BitBucket Cloud REST API 

Webhooks - JIRA Cloud 

Let us know if you have any questions.

Suggest an answer

Log in or Sign up to answer

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