Ever wondered how to get your Github for Jira workflow integrated seamlessly into your Jira Cloud issues?
Would you like to effortlessly view any warnings for Jira issues that haven’t gone through their proper code review (including merged pull requests) prior to deploying to a production release build from your master release branch?
Look no further.
When trying to find helpful Jira tips online regarding integrating Github using the Atlassian plugin I found it to be very frustrating.
Online Jira software tutorials are fragmented and don’t always show the ‘missing pieces’ to help you properly build a workflow solution that can help you further improve development efficiencies using one of the best agile project management solutions available today…Jira.
In this post, you’ll learn:
- How to install and configure the Github for Jira plugin for your Jira Cloud account
- What Smart Commits are and how they can help you create the ultimate software development workflow to streamline production release management and production support efforts
- How to view the Jira Release warning information when a dev/feature branch labeled with your Jira issue number doesn’t match your master branch based on open pull requests.
Whether you’re a release train engineer, product owner, scrum master or development team member, once you get this workflow setup you will start to see the power of Jira in a whole new way.
Github for Jira
Why use it? Simply put, the Github integration allows you to visualize your source repository data consisting of commits, branches and pull requests directly in Jira issues and release views so that you can quickly identify what’s going into a particular release and whether or not all pull requests have been merged to your release branch prior to deploying code to production.
I have to start off by saying that the Github for Jira plugin is actually pretty good, despite the negative reviews in the Atlassian plugin marketplace.
What sucks is the lack of clear step-by-step documentation to properly set it up so that you can see your Github repos within each Jira issue. The information is just an internet search away, if you’re patient enough to visit multiple sites to piece the steps together.
Using the Smart Commits Feature
In order to view your Github development branches, commits and open pull requests in each Jira story or issue (see above), you’ll need to ensure that you’re using the ‘smart commits’ feature of the plugin by using the additional issue key number in your commits. This is how the plugin links your repo and branch activity to the associated issue.
For example, the story above shows the issue key as “MWL-6” at the top of the issue. When entering a git commit either from the command line or via a GUI interface like Sourcetree you’ll want to include the issue key in the beginning of your commit message, you just need to ensure that you have a proper clone of the remote repository you are looking to eventually open a pull request to have merged to your master/release branch, like this:
<ignored text> ISSUE_KEY <ignored text> #comment <comment_string> Example above:
MWL-6 #updated site title and description
So, if you already have the plug-in installed and are wondering how to see your Development details in the issue details view of your Jira issue, then you must use Smart Commits to get it working. At least in my testing I wasn’t able to see any information until I started using the smart commit feature. (If you have been able to do this, please leave a comment below)
If you don’t have the plugin installed yet, then follow the below steps and then try the above smart commits example to get your Github repo information to populate your Jira issue.
Installing Github for Jira
- From within your Jira cloud account, go to Jira Settings > Apps > Find New Apps in the Atlassian Marketplace
- Type in “Github for Jira” in the search bar.
- In the manage apps screen, click “Get Started” button:
- In the Github configuration screen, click configure and you’ll be directed to login to your Github account to finish the integration setup of your Github repos:
Setting up your branches to link from Jira to your Github repo
- Once you’ve got your repos setup before you can start using smart commits (see the beginning of this post), you’ll need to have your Jira issue key number created as a branch. This can be done using the ‘Create Github Branches for Jira’ plugin created by Thomas Osowski. Go to the Atlassian marketplace following the above steps and search for it (see image below). Click install and then click manage.
- You’ll be prompted to configure access to your Github account. Follow the prompts and login to grant access to the plugin.
- Once you can see your Github repos in Jira, you can open any issue and then create a branch directly within the Jira issue by clicking the ‘Create branch’ link under the ‘GitHub Development’ section of your Jira issue detail right panel.
- Once you select the repo, you’ll be able to click the ‘View branch on GitHub’ to see the branch name that has the same number as your Jira issue Key (in this case, MWL-9):
So the whole setup in summary includes 2 plugins:
- Github for Jira
- Create Github Branches from Jira
Once you’ve got both setup and you start using smart commits you can start seeing the power of the integration within your GitHub repo commit history as well as when you open up any pull requests for review prior to a code release. This helps to ensure all code has been merged prior to deployment:
In the above image you can see that Jira issue MWL-6 shows a flagged Warning in the releases section since there is an open pull request that hasn’t been merged to the release branch. This is crucial to ensuring that your production build gets deployed without any issues once going into production.
That’s it. I hope this tutorial helped you finally get the GitHub for Jira Integration setup correctly.
If you have any comments, questions or feedback please let me know in the comments below.
Leave a Reply