Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gerrit configuration

Tags:

gerrit

we want to use gerrit for code reviews but we are missing some settings in the webview.

  • is it possible to forbid committers to review/verify their own commits?
  • is it possible that two reviewers give +1 an accumulate it to a +2 so it can be submitted?

thanks

like image 658
wutzebaer Avatar asked Jul 30 '12 14:07

wutzebaer


2 Answers

You can forbid self-reviews and add a +1 + +1 = +2 rule, but it isn't well documented. Newer versions of Gerrit use a prolog engine to calculate submit rules. Improved documentation for this feature is actually being worked on currently: https://gerrit-review.googlesource.com/#/c/37102/

like image 141
Brad Avatar answered Oct 11 '22 23:10

Brad


  • is it possible to forbid committers to review/verify their own commits?

Yes, setup autobuild to verify all commits. You can set this up by using the Gerrit Trigger for Jenkins or gReview for Bamboo. That way nobody has to verify commits. Additionally, you can setup superusers so only a select group can actually merge the final reviewed change.

is it possible that two reviewers give +1 an accumulate it to a +2 so it can be submitted?

No, two +1 doesn't make the +2 necessary to submit. Here's what the doc says:

The label that the reviewer selects determines what can happen next. The +1 and -1 level are just an opinion where as the +2 and -2 levels are allowing or blocking the change. In order for a change to be accepted it must have at least one +2 and no -2 votes. Although these are numeric values, they in no way accumulate; two +1s do not equate to a +2.

like image 26
Jason Huntley Avatar answered Oct 11 '22 21:10

Jason Huntley