How to configure a minimal review time on gerrit?

59 Views Asked by At

I am looking for a way to configure gerrit (include the public gerrithub.io instance) so it would not allow hasted reviews.

What I call a hasted review is one where the change gets approval and gets merged in a such short period of time that it doesn't really allow for anyone else to review it.

These kind of reviews are dangerous as I think that each project should have a configurable time-window that should be somewhere between 10-120 minutes.

Assuming that you configure a time-window of 30 minutes, it means that the change would not be merged before 30 minutes are passing since it did receive enough votes.

While some people would say that this is also a security issue, I am more concerned about reviews being made only by two 2-3 people involved in making the change in the first place. This means that the external opinion rule is somehow bypassed.

It seems that I am not the only one looking for a solution like this:

1

There are 1 best solutions below

0
ElpieKay On

In Gerrit's hook patchset-created, give a -2 review to any new-created patchset so that the patchset can't be submitted and start a timer to change -2 to 0 in 30 minutes so that the patchset will be unlocked.