Gerrit Productivity Hacks – Add Default Reviewer

November 10, 2015 Dharmesh Sheta

We often get requests from the TeamForge users who’re using Git Integration for the one very common use case:  “How can I add a default reviewer to the code review request ? ”

Well, answer became much simpler with Gerrit’s  Reviewer plugin  and Gerrit 2.11 with which plugin can be configured per project with the comfort of Gerrit webUI.

Installation

The verified version of the plugin can be downloaded or install directly.

Download and install

wget https://s3-ap-southeast-1.amazonaws.com/ctf-dev-environment-vagrant/reviewers.jar
ssh -p 29418 <USERNAME>@<GERRIT_HOST>  gerrit plugin install -n reviewers.jar  -< reviewers.jar

Direct install

ssh -p 29418 <USERNAME>@<GERRIT_HOST>  gerrit plugin install -n reviewers.jar  - https://s3-ap-southeast-1.amazonaws.com/ctf-dev-environment-vagrant/reviewers.jar

Replace USERNAME with the user with administrators user and GERRIT_HOST  with the hostname of your Git integration server. In the future release of Gerrit 2.11, this plugin will be bundled so going forward it will not require to install it separately.

Usage

Plugin allows to configure default reviewer(s) per repository.

Go to Gerrit WebUI->project menu bar-> List-> Select project (repository name in TeamForge)

Click on the Reviewers tab

 Here you can specify filter and the default reviewer.

 reviewer can be added by name or email address.

filter can be of multiple types:

  1. *  (wildcard)  for any code review request  for this repository
  2. branch:master   for any code review request for the branch
  3. branch:release file:^lib/.* for any code review request for the release branch which involves change in lib directory

 

 Now with this configuration in place, any new change will have reviewer added as per configuration.

That’s it. Very easy. isn’t it?  Add your peers as a default reviewer and get their attention easily !

Previous Article
How Unified Software Development and Delivery Makes the Vision of DevOps a Reality
How Unified Software Development and Delivery Makes the Vision of DevOps a Reality

  Are you finding that DevOps is more vision than reality? Here’s how you can unify the systems that DevOps...

Next Article
Budgeting Your Strategic Themes to Help Teams Deliver Value 
Budgeting Your Strategic Themes to Help Teams Deliver Value 

stra·te·gic – strəˈtējik/ adjective relating to the identification of long-term or overall aims and interes...