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

Raise a Jira when a pull request is created

Chris Shepherd April 2, 2024

Hi folks,

We have a requirement that whenever a pull request is created for a specific branch (production), a Jira issue is created.  Is this possible?  Would we need a plugin like scriptrunner?

Ideally, we would also only be able to merge the PR if the Jira issue is in a specific status.  Is that possible too?

thanks in advance for any pointers.

 

1 answer

1 vote
Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 2, 2024

whenever a pull request is created for a specific branch (production), a Jira issue is created

This part of the problem could be solved if you could call the incoming webhook Jira automation trigger every time when a PR is created. That way you could use the automation rule to test if the branch is a "production"  branch and create the issue if it is. The question is what is the best way to send a webhook call from Bitbucket after a PR creation? You could surely develop a little custom app for that, but if you aren't a developer it could be cumbersome.

This is where ScriptRunner could help, but then you could even develop the "check branch" and "create issue through the Jira REST API" steps in the ScriptRunner executed Groovy script.

Ideally, we would also only be able to merge the PR if the Jira issue is in a specific status.

This part of the problem can be elegantly solved with the Better Commit Policy for Bitbucket app. See the verifying pull requests section in the product guide.

rejected-pull-request.png

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events