You are not logged in. Click here to log in.

Please note that you will not be able to log new support cases in this system after December 31, 2023. More Details here.

Search In Project

Search inClear

Tags:  not added yet

Code Review in codebeamer


With Codebeamer's great features it is possible to:

But now - since Codebeamer 7.4 - a great new feature is arrived: Code Reviews in Codebeamer!

Code reviews are great tool for enhancing collaboration between developers, reviewers and other team members. It helps to provide feedback to original authors of a code change, spot bugs and other code problems early, therefore improve code quality greatly.

Code Review for Pull Requests

In a typical workflow whenever a developer or a team completes some tasks then they submit a Pull Request to the master repository by indicating that the code is ready for integration.

That time the Pull Request is fired, the integratiors and fellow team members has the opportunity to look at the new code changes, and review them. So then starts the review...

The code review is really an easy task, as easy as submitting a simple comment to an issue. The reviewer opens up the Pull Requests and finds the cumulated diff of the changes there. As the reviewer reads the code he may have some questions, suggestions to improvements, or can even spot some potential bugs in the code. So then the reviewer can simply click on any code-lines in the diffs and start adding his comments there.

This is how this look like:

After the review comment is ready and saved the review is ready, and other collaborators will see it too. This shot shows how multiple comments from different authors look like:

The code-review comments are just like any regular comments, in fact these will become also comments on the Pull Request itself. This also means that all interested parties will be notified when a code-review comment is submitted.

So one can also view and even edit these comments on the "Comments" tab:

Voting and Voting workflow (enforcing) for Pull Requests

Besides code-review some organisations require stronger rules for accepting a code-change into a main repository. For such cases the administrators/integrators of these sacred repositories can enforce a rule, that at least 2 or more people must say "Yes" to a change before it can be merged. For such cases the the Voting for Pull Requests is introduces.

In short Voting for Pull Requests means:

  • The administrator can set up for any repository a threshold number, and only if a Pull Requests gets that many positive votes in total then it can be merged.
  • Any user who can read the repository or Pull Request then he can also send a vote. Except the original submitter of the Pull Request, he can not Vote.
  • Users can Vote with +1 or -1, and same time can also add a wiki comment why they do this.
  • The Pull Request can be rejected or revoked regardless of the Voting.
  • After the total number of Votes (including positives and negatives) is reaching the Vote threshold only then the integrators can merge it.
  • Even integrators can not merge if the Vote limit is not reached.

Let's look at this process in screenshots:

Configuring Voting and Voting threshold Voting can be enforced by setting the threshold on the properties page of the protected repository. The Voting number can be any number greather than 0, and 0 will effectively disable this.

Submitting a Vote When viewing an Pull Request the Voting widget appears in the action-bar as visible here. You can send your Vote by clicking on either the up/green hand for "Yes" or the down/red hand for "No". The current total number of the Votes is shown between the two hand icons.

When mouse moves over this widget the tooltip will show these informations:

  • The number of Votes required in total
  • The number of Yes and No votes
  • Your own vote if that was submitted already

See below. Also note that "Merge" is not appearing because the Vote threshold is not reached !

Vote comment_

When a Vote "hand" is clicked you can also add your comment:

Vote submitted After your -or others'- Votes are submitted the Vote statistics will appear. Also if the threshold is reached the Merge link is available. For any Votes that is also appearing as a comment on the Pull Request:

Vote summary

The integrators can see how voting goes when looking at the Pull Requests' list:

Code Review and commit comments for Issues

It is also possible to add code-reviews to code changes to issues.

Once a code change is associated to an issue then changed code will appear as an unified diff on the "SCM Commits" tab. You can also submit an code comment there the same way as described earlier. The code-comments will be added to the issue as comments.

A screenshot shows an issue while adding code-review to it: