DEV Community
Follow
Stop Manually Updating Jira After Every PR Merge
The article addresses the time-consuming manual process of updating Jira tickets upon merging pull requests. The author highlights the inefficiency, citing potential hours wasted annually per engineer and the frequent omission of updates. The proposed solution involves using two GitHub Actions workflows and a shared composite action to automate the process. A composite action extracts the Jira ticket ID from PR titles, commit messages, or branch names. One workflow, triggered by PR creation, links the Jira ticket in the PR. The other, triggered on merge, posts a comment to the Jira ticket with relevant information and transitions the ticket to Done. The article provides the code needed to implement these workflows and the composite action. Instructions on finding the Jira transition IDs needed for completion are included. The author emphasizes using the v2 Jira API. The article concludes by listing necessary secrets to be configured within the repository and reports positive results, including eliminating manual updates and improving audit trails. Finally, this setup offers significant time savings for developers.