How to add a GitHub repository in Jira

Estimated read time 5 min read

[ad_1]

Jack Wallen shows you how to add a GitHub shortcut to a Jira project so you can view information about branches, commits and pull requests in Jira issues.

GitHub logo on the screen smartphone and notebook closeup.
Image: prima91/Adobe Stock

When Jira is your project management solution of choice, you know that you have a world of options at your fingertips. When your projects are of a software development nature, you are fully aware that your teams will need to have some sort of connection to code repositories such as GitHub.

SEE: Hiring kit: Project manager (TechRepublic Premium)

Jira includes such a feature, which not only allows your team members quick access to a specific GitHub repository but also makes it easier for members to create branches and commits. I’ll show you how this is all done with ease.

One thing to keep in mind is that the connection doesn’t exactly make branches and commits a point-and-click affair. What it does do, however, is automatically create the commands your members would need to run from the Git CLI, so they can more easily create the branches and commits with a decidedly Jira flavor. I’ll explain this in a bit.

What you’ll need to add a GitHub repository in Jira

To make this work you will need both a valid Jira account and a GitHub account. You will also need a GitHub repository to connect to Jira. That’s it.

How to create the GitHub shortcut

The first thing you must do is log in to your GitHub account. Once there, locate the repository you want to link, click the Code drop-down and make sure to copy the HTTPS link, which will look something like this:

https://github.com/USERNAME/fleet-infra.git

Where USERNAME is the username associated with the GitHub account.

Once you have the link to your repository, log in to your Jira account and navigate to the project. On the project page, you’ll see Add Shortcut in the left navigation. Click that link, and in the resulting pop-up, click Add Associated With Repository (Figure A).

Figure A

The Item Add pop-up in Jira.
The Item Add pop-up in Jira.

In the next pop-up (Figure B), paste the repository link, give it a name and click Connect.

Figure B

Connecting a GitHub repository in Jira.
Connecting a GitHub repository in Jira.

At this point, you should see a link to the repository in the left navigation (Figure C).

Figure C

Our GitHub link has been added.
Our GitHub link has been added.

Now, anyone with access to the project page will have quick access to the GitHub shortcut.

How to connect GitHub to Jira

We also need to add an app to gain more GitHub features. For more detailed information about making this connection, check out How to integrate GitHub and Jira. For the quick fix, click the Apps drop-down and then Explore More Apps. In the Apps Marketplace, search for GitHub and then click the entry for GitHub For Jira. On the resulting page, click Get App to install.

Once the app is installed, you’ll see it listed in your installed app listings. Expand the GitHub for Jira listing and then click Get Started (Figure D).

Figure D

The listing for the GitHub for Jira app.
The listing for the GitHub for Jira app.

In the resulting window, click Connect GitHub Organization. You’ll be redirected to yet another page, where you must click Connect (Figure E) to make the connection between GitHub and Jira.

Figure E

Connecting Jira to a GitHub account.
Connecting Jira to a GitHub account.

The connection will take a few seconds but once it’s done you’re ready to go.

How to use the connection

Your team members now have quick access to the GitHub repository in question, but they can also find a way to create branches and commits when they create an issue. Here’s how it works:

  1. Log in to the Jira site and access the associated project.
  2. Open an issue.
  3. You should now see a new section titled Development.
  4. Click the Create Branch drop-down and you should see the command used to create the branch (Figure F).

Figure F

"Git Create & Checkout A New Branch" option under Create Branch drop-down in GitHub.
“Git Create & Checkout A New Branch” option under Create Branch drop-down in GitHub.

You would then go to a terminal window on a machine that is also connected to the GitHub repository and then paste/run the command. The same thing holds with the Commit option in a Jira issue. Copy the command and then run it via the CLI on your desktop machine. For the commits, you’ll also see an issue key. Make sure to add those issue keys to the commits to link them to your Jira issues.

Although your teams won’t be working directly with code, this is a great way to simplify the workflow between Jira and GitHub. If you use those two platforms, I would highly recommend you make this connection and see if it can help your teams work with your GitHub repositories a bit more efficiently.

Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the latest tech advice for business pros from Jack Wallen.

[ad_2]

Source link

You May Also Like

More From Author