gitgerrit

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


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?


Solution

  • 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).