Hello Atlassian Community,
I'm looking for guidance on how to automatically close GitHub branches when a Jira story transitions to the "Done" status. We're using Jira Software for project management and GitHub for version control, and we want to ensure that branches associated with completed stories are deleted to keep our repository clean. I'm wondering if this can be accomplished through Jira's automation features or if I need to integrate another tool to achieve this. If anyone has experience with this or can suggest the best approach, I would greatly appreciate your advice.
Thank you!
I think you need to look at the API from GitHub and based on Jira automation, send a web api call to GitHub to close a branch.
Thank you for your suggestion @Marc - Devoteam
Could you please help me with more detailed guidance on how to set this up?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Suggest to read the API docs from GitHuB, if this is possible and what is needed to do so.
Jira automation: https://support.atlassian.com/cloud-automation/docs/issue-data-automation-format-payload-for-send-web-request/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you,
I was able to delete branches by hardcoding the branch name in the web request url, but I want to make this dynamic. How can I retrieve the exact branch name linked to the issue from GitHub?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.