I have seen articles about automatically moving an issue when the linked pull request has been merged but is there a way to do the opposite. Merge the pull request when an issue has transitioned from one column to the another?
Hi @Ben Harris -
You'll probably end up needing to send a Web request to Bitbucket's REST API. Here's a good explainer on that:
This is the endpoint to: Merge a pull request
I highly recommend that you add a comment indicating that the merge was done by an automation in Jira, just so there's good accountability/visibility into the process.
The other thing to consider is how you'll deal with merge failures. It looks like the endpoint can potentially return a 202 status code and you would then need to get the merge task status, which could show an error.
You would want to include a way to handle for that error (add a comment with the error message, and then move the issue back to the previous column?)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.