Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to let Gerrit randomly pick a reviewer?

Tags:

git

gerrit

Is it possible to let Gerrit randomly pick a reviewer?

If it isn't possible by configure Gerrit, is it possible by doing it via Git commands / scripts?

like image 397
corgrath Avatar asked Apr 17 '12 08:04

corgrath


1 Answers

You can't configure gerrit to assign a random reviewer, nor a default reviewer/per project. See issue upstream.

You can however use the query API to get all open review requests, then you can iterate over the JSON data and find the ones with no active reviewer from a certain group

ssh gerrit.server gerrit query --format=JSON status:open NOT reviewerin:<your group>

You can then add the reviewer using the set-reviewers API:

ssh gerrit.server gerrit set-reviewers --add <name> <ChangeId Received From Above>
like image 193
phb Avatar answered Sep 28 '22 12:09

phb