Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to resolve unreviewed code warnings

Tags:

bitbucket

jira

We are using Jira 6.4.1 connected to Bit bucket 4.3.2. When i look at the releases for my project i see a number of warnings for some specific Jiras. The warning is:

Unreviewed Code These issues have been marked complete but the commits are not part of a pull request or review.

Usually as my workflow i may push commits direct to the repo without code review; but the issues listed seem a bit random and i can workout whats been done with them.

What causes this state and warning, and how can i resolve it?

like image 424
Tim Avatar asked Feb 02 '16 14:02

Tim


2 Answers

This warning is caused by having a jira issue key used in commits, but that issue key not appearing in a pull request or review. The assumption is made that all code included in that release should be reviewed.

There are two ways to remove that warning. The first is to change your development process and start using pull requests instead of committing straight to master.

The second is to turn that warning off. On the warnings tab there should be a button Manage Warnings that opens a dialogue where you can select what will trigger a warning. You want to unselect the Unreviewed Code checkbox.

like image 69
Gene Taylor Avatar answered Nov 14 '22 18:11

Gene Taylor


This issue can happen regardless of using pull requests, for example if someone refers to the issue only in a merge commit message.

To resolve this and get rid of the warning, you can create an empty commit (git commit --allow-empty -m "Review ISSUE-13") in a new branch that references all the issues affected using the commit message. Then open a pull request for it and merge it as usual. Jira will see the pull request as being merged and the warning is cleared.

like image 9
voneiden Avatar answered Nov 14 '22 18:11

voneiden