Here is code review rule for the whole organization.
- 🔔 Git code has access control. If anyone wants to access the code of one git, he/she has to apply that from git owner. The git is invisible for people without permission.
🔔 Push code into git repository without code review is forbidden, unless for those branch starts with "feature/".
$git push origin HEAD:refs/heads/master ❌
$git push origin HEAD:master ❌
$git push origin HEAD:refs/for/master ✅
$git push origin HEAD:refs/heads/feature/mybranch ✅
$git push origin HEAD:feature/mybranch ✅
🔔 There are following roles for each git. The member of each role is defined per git.
👨 Developer: Developer can read code and push CL into gerrit for review. Developer can abandon his/her own CL. Basically every developer is a reviewer.
👨 Reviewer: Reviewer can provide -1, +1, and add comment to any CL, but cannot provide -2, +2, or submit any CL.
👨 Merger: Merger can provide -2, +2 to any CL. Merger can abandon any CL. Merger should not submit the CL if no reviewer provides +1. Merger should not submit his/her own CL without +1 from others.