Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to automatically add default reviewers in gerrit when change owner adds +1?

Tags:

git

gerrit

How to add reviewers to a Gerrit changeset when commit author/change owner reviews his own change by adding +1 to either 'code review' or 'verified' section? This is common practice that change owner makes multiple patchsets and when it is ready he marks +1 and adds other reviewers manually so that they can start reviewig. How can gerrit be configured to add reviewers automatically since we have the same set of reviewers for all patches?

like image 640
harish Avatar asked Nov 20 '14 12:11

harish


People also ask

How do I add default reviewers to Gerrit?

The default reviewers can be configured in the Gerrit Web UI under Projects > List > <your project> > General in the reviewers Plugin section. The reviewers-by-blame plugin can automatically add reviewers to changes based on the git blame computation on the changed files.

How do I add a default reviewer to github?

Adding default pull request reviewers for a single repository. To add default pull request reviewers for a single repository (requires repo admin permissions): Go to Repository settings > Default reviewers. Click Add default reviewers.

How do I change owner on Gerrit?

Go to: Projects > List > All-Projects or a specific project > Access > Edit and add permissions. More info: gerrit-documentation.storage.googleapis.com/Documentation/…

How do I review a change in Gerrit?

To manually verify a change, a reviewer must have the Verified permission. Then, the reviewer can fetch and checkout that branch from Gerrit. Hannah has this permission, so she is authorized to manually verify Max's change. The Verifier can be the same person as the code reviewer or a different person entirely.


1 Answers

Functionality you ask is not present in Gerrit by default. However, for adding default reviewers for a project, there is a plugin for it. That adds reviewers who would be always there for a given repository.

Other alternatives, as highlighted in this discussion, is to ask the reviewers add the project as a watched project or write a hook for it. However I'd use the plugin.

The binary for the plugin is downloadable from jenkins (2.12, 2.11, master).

like image 189
eis Avatar answered Sep 20 '22 19:09

eis