Issue 764: Reviewer/submitter suggestions based on a change's target repo and the set of files it modifies
Reported by jjhel...@gmail.com, Oct 27, 2010
Developers in my organization would benefit from a Gerrit feature that'd suggest appropriate reviewers and submitters for a change submitted to Gerrit.

This would help reduce the latency of a change getting reviewed and submitted, as the system could be configured to help change authors pick the right domain experts for review and the appropriate architects or managers for submission.  This is especially true for repos that span multiple modules and each sub-directory having their own experts and owners.

The way I thought this could work would be as follows:

1) Admins could configure lists of reviewers and submitters for each repo.  This would be a list of (regexp,[reviewers]) tuples so that you could do something like this:

(assume Android's frameworks/base.git repo structure http://android.git.kernel.org/?p=platform/frameworks/base.git;a=tree;h=refs/heads/master;hb=master)

- (base.git/graphics/*, [gfx_expert1, gfx_expert2>,...])
- (base.git/services/audioflinger/*, [audio_guy1, audio_guy2, ...])

2) A developer submits a change to Gerrit.  Gerrit looks at the above reviewer/submitter match list to see it can suggest a reviewer or a submitter for the change based on the target repo and the files the patch touches.  A list of names is shown in the UI in the order of relevance (i.e., the primary reviewer is listed first) and the developer can click on the names to add the suggested reviewer on the reviewers list.

We've tried different ways of getting this done via documenting similar information on an intranet wiki page.  However, it's not convenient to look up the wiki page on every change upload.  This would also help Gerrit admins to load balance review and submit work better if they detect a single submitter/reviewer is getting too many review requests.
Dec 13, 2010
Project Member #1 fredrik....@sonyericsson.com
This sounds like a good feature. We've discussed something similar within our $DAYJOB, however I believe that this is not the task of a Gerrit admin, but rather the task of the individual reviewer.
Simply put, the watch function should be tweaked with the similar regexp-option you mention in your bug, allowing the reviewer to subscribe partially to changes in a git, and perhaps even allow a new change to the path in question to have their name automatically added as a reviewer to the change (like you suggest).
This would let the gerrit admin off the hook of configuring this for 2000 developers, and it would allow more freedom to the developer herself. She can even reconfigure her watch-settings while on vacation..
May 20, 2011
Project Member #2 nas...@grainawi.org
Needs the prolog engine to be sufficiently customizable.
Status: Accepted
Blockedon: 971
Oct 25, 2012
#3 JBjo...@gmail.com
I don't really think this is the job for the submit-rule engine. While it could kind-of-work with some extensions to it; it seems much better to extend the 'Watch Projects' as mentioned in comment 1
Aug 21, 2015
Project Member #4 nas...@grainawi.org
We have a plugin we'll be contributing that uses past approvals to suggest reviewers when users click to add reviewers.
Status: Started
Owner: mf...@codeaurora.org
Blockedon: -gerrit:971