At Redberry, we extensively use Github for most of our projects’ version control, development team collaboration, CI & CD pipelines, etc. We have also been using Jira for years to manage our projects. So the ultimate wedding – Github and Jira Integration – was inevitable.
Before setting up the integration, we faced problems with synchronization between Jira and Github. Ever had to chase down developers to update Jira and move cards from one column to another? Yeap, then you know what I am talking about.
But, we really needed to associate Jira cards with specific feature branches and commits on Github to easily understand which codebase changes contributed to the completion of which Stories/Tasks.
That led us to integrate Github and Jira so that Github acted as a single source of truth for Jira card statuses and also for the feature branches and commits getting automatically associated with the respective cards.
As a result, we arrived at the following Github-Jira automation:
- Once a feature branch is created on Github for a particular Story card on Jira, the Jira card automatically moves from To Do to In Progress.
- When developers create a Pull Request on Github, the respective Jira card automatically moves from In Progress to Under Code Review.
- If the Pull Request is declined, the card goes back to In Progress;
- If the Pull Request is merged, the card goes from Under Code Review to Ready for Testing
- After that, the QA Testers either move the card to Done or back to In Progress
If that sounds interesting, you can continue reading further to learn how the magic works.
How Do We Build GitHub and Jira Integration?
Before we build the integration between these two platforms, let’s discuss the configuration process first.
Configuration
First and foremost, install the Github app on Jira. Click “find new apps” and search for “Github for Jira”. Click “Get The App,” and Github will be added to Jira.
Next, configure the app to use it. Click “Get Started,” and you will get to a GitHub configuration page. This is where you connect certain GitHub groups and repositories to Jira and begin tracking your work.
Click “Connect GitHub organization” and authorize Jira. Then choose where you want to install it.
Setting Up Automations
After the configuration is complete, you’ll need to set up automation rules for your project.
First, go to “Project Settings” and then to “Automation.”
You can start creating your automation rules here. Rules consist of Triggers, Conditions and Actions. For example, if you need to automatically move Jira issues to In Progress when a developer creates a feature branch and starts working on the task, you will need to add “Branch created” as a trigger and “Transition the issue to” as an action.
You can create and manage as many automation rules on Jira as you need and tailor them to your specific workflow and processes.
And that’s it. Your automation should be working fine.
Now, a few words on the usage process and how Github branches and commits get associated with the Jira issues.
Usage & Developer Experience
The whole idea behind integrating Jira with Github is to always get up-to-date statuses on Jira with as little disruption of the software engineers’ normal development processes as possible.
From the developers’ perspective, it all works like this:
- First, the developer goes to Jira to pick the next Jira card to work on.
- Then, the developer uses the Jira issue ID to create a feature branch on GitHub and make commits.
So the entire integration is based on the matching Issue IDs. Here’s an illustration to get a better idea of the process:
OM-6 is the issue ID given on Jira for this card. To ensure the automation follows through, we must create a branch on Github with a name containing the same issue ID.
If you would also like to associate commits to particular Jira issues, you must include the Jira issue ID in the commit message.
This will make your automation rules set up on Jira apply to the right cards.
The Benefits of Github and Jira Integration
To summarize, here are some of the essential benefits of Jira integration with Github
- Data shown in Jira projects and issues makes it simple to comprehend what’s going on in your Git repositories.
- Allows team members with a wide range of technical expertise to engage and identify who is actually responsible for which task.
- Ensures that the card statuses are updated on Jira and in sync with the work performed.
- Improves overall developer experience in your team