Auto merge pull request (Jira-Bitbucket)

Christian Ovington December 6, 2019

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
Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 12, 2019

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