I'm currently using Jira to control my project's issues and bitbucket to control my code. I've created in my workflow, a transition form 'Ready to deploy' to 'Deployed' status. What I want is to, when, from Jira, my button 'Deploy' that makes the transition between those status above, trigger a post function to merge the pullrequest of that branch.

Anyone knows a simple way or free plugin to do that?

1 Answers

0
Community On

If you are looking for a solution other than that of a paid plugin , here is something you can try out. I'm assuming you are using Bitbucket along with Jira.

  • Write a python script using "Jira python" module which can fetch you all required issues based on a JQL ( you can setup a cron , let's say every 30 mins to run it).
  • Within the same script, get the PR (Pull Request) ID of each of those issues using REST API or "Python Jira" and call Bitbucket REST API to merge them.

In this way , you can make sure every PR is merged within a specified time after the related issue has been moved to "Deployed" status.