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.

Connecting Jira 6.2 to GitHub

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.

Developer Applications

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!

jira_oauth_trust-600x330

Once everything is setup, GitHub will return a Client ID and secret. Hang onto these. You’ll need them in Jira.

GitHub Client ID and Secret

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.

Configure GitHub for 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.

  1. 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.
  2. 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.
  3. 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.

 


Read more about git topics

Connecting Jira 6.2 to GitHub