<

Jira and Code Reviews

Published on
6,028 Points
2,728 Views
3 Endorsements
Last Modified:
Jira and Code Reviews
Recently our company was researching switching from our current issue tracking system over to using Atlassian’s Jira product.  While doing the switchover I wanted to make sure that my team would be able to do formal code reviews to guarantee quality of code changes.  While looking at all the plug-ins and external products that Atlassian offers, our team was unable to figure out exactly which products we should use.  We had it narrowed down between Stash, Bitbucket and Fisheye and Crucible, but really couldn’t tell which one was best for us.  We eventually needed to call a sales engineer to figure it out, so I would like to share what we learned from that call.

Fisheye and Crucible
Fisheye and Crucible is a tool that Atlassian recommends for users that are not using a DCVS system.  This would include using revision control systems like CVS and SVN.  Since we were looking at using GIT as our repository, the sales engineer did not recommend using Fisheye and Crucible.

Stash
Stash is a useful tool that can be used for GIT repositories.  Stash can also be used for code reviews.  The sales engineer recommended using this product if you want to host the GIT repository yourself.  Since our team wanted to host our repository in the cloud we decided that this was not the solution for us.

Bitbucket
Bitbucket is Atlassian’s cloud based solution for hosting GIT repositories.  Since we wanted a cloud solution, this was the tool that Atlassian recommended for us.  They actually recommended that we use their GIT Essentials offering (https://www.atlassian.com/solutions/git-essentials) which they do a horrible job at advertising what it is.  Basically it is a bundled offering for Bitbucket, Jira and Bamboo.  Bamboo is Atlassian’s product for doing automatic builds and deployments.  So, if you are using GIT and want to have a cloud hosted solution, GIT Essentials is the solution for you.

Code Reviews in Bitbucket
Since originally this all started with me trying to do code reviews, I will walk through how you can do them in Bitbucket using Jira.  When you integrate Jira with Bitbucket it allows you to create a branch in GIT straight from the issue in Jira.

1) First Click the Create Branch button in the right nav.

Jira-Create-Branch.bmp
 2) This will take you into Bitbucket where you can create the branch.

Jira-Create-Branch-2.bmp
After you complete your work and commit your code to the branch, you can create a pull request from the Issue.  This will allow you to create a pull request in Bitbucket to merge your code from the branch into the master branch.  When you create the pull request you can assign the pull request to a user in Bitbucket for them to review.  The reviewer will be able to see the changes directly within Bitbucket.  This will allow another user to do a quick code review without having to pass code around via patch files or checking out other branches.

3) Create a Pull Request through Jira.

Jira-Pull-Request.bmp
 4) Fill out request information and submit pull request in Bitbucket.

Jira-Pull-Request-2.bmp
5) Once the request is made another user can approve with the top right button while looking at the code changes below.

Jira-Pull-Request-3.bmp
Once the pull request is approved you can then merge the code into the master branch through Bitbucket.  This allows you to easily have other team members review code changes and increase code quality.
 
3
Comment
0 Comments

Featured Post

Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

Join & Write a Comment

With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month