Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I see which branch a PR was merged into?

André Valentin July 7, 2020

Hi,

I see that there are a bunch of smart values I can use for automations connecting Github to Jira, is there a way I can get the target branch of a pull request? There is the action on merge, but I would only like to do certain actions on merge to certain branches.

Thanks a lot.

2 answers

1 accepted

0 votes
Answer accepted
André Valentin July 22, 2020

I just wanted to write an answer here to anyone who might stumble over this thread in search for the same answers I was.

It is actually not that difficult, but you can't use the standard Jira features when it comes to the "development" integration. You have to use an incoming webhook, and point your Github webhook settings towards the Jira endpoint, configuring it to notify Jira of any activities on pull requests. In the body of the pull request you have all the information you need, so base and target branches, PR titles etc.

I hope this helps anyone else searching for answers on this topic. But it can definitely be done, just not directly out of the box.

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 9, 2020

Hi @André Valentin -- Welcome to the Atlassian community!

According to a response from Atlassian staff on this community post in June 2020, there is no support yet for target branch in the smart values:

https://community.atlassian.com/t5/Jira-Questions/Automating-state-transition-on-PR-merge-based-on-target-branch/qaq-p/1390430

 

Best regards,

Bill

André Valentin July 22, 2020

Hello Bill,

Thanks for dropping by and welcoming me to the community.

I did figure out the solution to the answer, and posted it in case anyone else wants to use this in the future.

Regards,
André

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 22, 2020

I am glad that you figured it out, and thanks for posting the solution to help the community!

__Bill

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events