In almost every instance, software development is a collaborative effort – multiple people are working with any given issue during an its lifecycle. Product owners, developers, as well as business stakeholders all need to be involved during the software development lifecycle. With JIRA 6.2 we released deep integrations with Atlassian’s Git tools, Stash and Bitbucket. Many of you wanted to know if JIRA’s development features would work with GitHub, and I’m pleased to say that the answer is “yes.”
One of the best practices in issue tracking is to keep all parts of an issue in one place, and JIRA lets teams keep everything – issue details, attachments, important logs, relevant conversations – in one central location. JIRA 6.2 brings rich development context inline with the rest of the issue. GitHub users will see branches, commits, pull requests, and optionally build/deployment status using Bamboo.
How does this make your life easier? JIRA with GitHub makes it easy to come up to speed on a new issue. One example of how JIRA and GitHub together make your life easier is during code reviews. Once development on an issue is complete, a code reviewer or test engineer will then need to come up to speed on the issue. In JIRA 6.2, a code reviewer can easily step into an issue with all the same context as the original developer.
Reviewers can not only see the core code changes, but build status and prior pull requests. Smoother handoffs between engineers mean better results: delivery times and higher quality.
Linking and authorizing JIRA to work with GitHub
JIRA connects to GitHub using OAuth. OAuth is a protocol for a client (JIRA) to request information on behalf of a user of a server system (GitHub in this case). Let’s look at how we can set up an OAuth trust between JIRA and GitHub.
1. Install the DVCS Connector
The DVCS connector is one of the many add-ons in the Atlassian Marketplace. To install, just click the administrative settings in the toolbar and choose add-ons. Search for the DVCS connector and install.
2. Configure a JIRA OAuth application in GitHub
JIRA will need to access GitHub on behalf of a user. I’d recommend creating a specific user in GitHub for this purpose. Linking it to someone in your organization them makes the integration attached to that person’s account which is not optimal.
Log into GitHub as the JIRA integration user and go to that user’s account settings. Click applications to go to application settings. You’ll want to register a new application.
When setting up the new application in GitHub most of the fields are self explanatory. Use the homepage of JIRA as the homepage URL. For the authorization callback URL, you’ll need JIRA’s callback URL. It’s simply the JIRA_BASE_URL!
Once everything is setup, GitHub will return a Client ID and secret. Hang onto these. You’ll need them in JIRA.
3. Configure GitHub for JIRA
The last step of the process is adding the GitHub repository into JIRA. Just go into any project admin in JIRA and click development tools. You can then configure JIRA to work with GitHub. Use the client id from GitHub as the OAuth key in JIRA and the client secret from GitHub as the OAuth secret in JIRA.
At this point JIRA will begin scanning your GitHub instance looking for references to JIRA. JIRA looks for at least two uppercase letters, a dash, and a number as an issue key (ala TIS-12). If it finds an issue key in a branch name or a commit, it will show it the development panel for that issue.
3 Tips for integrating GitHub and JIRA
Here are a few tips on using GitHub and JIRA together.
- Depending on the size of your GitHub repository, it may take some time for JIRA to complete the full index. Schedule the indexing on a weekend when both systems are lightly used.
- Issue branches make branching and merging easier. Learn more about Git workflows at Atlassian’s Git Tutorials site. Issue branches also isolate work to an issue so it’s simpler to track, test, and deploy.
- JIRA supports smart commits so developers can manage issues when committing code in GitHub. For example, “TIS-123 #comment Task completed ahead of schedule #resolve” logs a comment in issue TIS-123 and transitions the status to resolved.
Rich development information makes development more transparent and the team stays more in sync. Stakeholders can easily see the status of issues minimizing interruptions for developers. Handoffs between developers for code reviews and test engineers for quality reviews now happen in higher fidelity.
Using JIRA 6.2 or JIRA Cloud?
You’re ready to get started. Install the JIRA DVCS Connector today.
Using JIRA 6.1 or earlier?
All JIRA licenses come with 12 months of support and updates. See what’s new in the latest releases of JIRA. You can download the latest version of JIRA at my.atlassian.com or start a new 30 day trial of JIRA 6.2. Running JIRA 5.2 or earlier? Learn how to renew your JIRA license and upgrade.
You might also like our ebook, “Hello World! A new grad’s guide to coding as a team” – a collection of essays designed to help new programmers succeed in a team setting.
Grab it for yourself, your team, or the new computer science graduate in your life. Even seasoned coders might learn a thing or two.