wutzebaer
wutzebaer

Reputation: 14865

Gerrit configuration

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

thanks

Upvotes: 5

Views: 2490

Answers (3)

Jason Huntley
Jason Huntley

Reputation: 3877

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

Upvotes: 4

David Pursehouse
David Pursehouse

Reputation: 971

The documentation that Brad mentioned in his answer is now merged into the master branch of Gerrit and available in the latest release (2.5.1 as of now):

Make change submittable only if Code-Review+2 is given by a non author

Make two +1 votes equal +2

Upvotes: 0

Brad
Brad

Reputation: 5532

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/

Upvotes: 5

Related Questions