Code review scoring against customizable labels (or categories) which can block MR
Description
Customer has requested a feature that they use in Gerrit, but which is not currently available in GitLab. As requested by customer:
In our existing Gerrit environment, we make use of the built-in “categories” (aka “labels”) for voting/scoring reviews. Gerrit has two built-in categories, “Code Review” which has scores ranging from -2 to +2, and “Verified” which has scores ranging from -1 to +1, and without the proper score in each category, reviews cannot be merged. But it also lets you define your own categories with their own ranges of scores, and we use this with our in-house CI system to let it “vote” on the review.
Customer workaround
My best suggestion to our CI team is to (a) add a comment to the MR and (b) add an “award emoji”, e.g. thumbs-up or thumbs-down, to indicate whether the tool considers the MR good or bad. But none of that can block/approve the MR as far as I know. We could look at making the CI system be an approver and enabling the approver feature on all projects, but I’m not sure we want to go that route.
Proposal
Provide a more granular upvote/downvote system for MR's with customizable categories such as code review, verified with score limits customizable as well (i.e. (-2,+2), (-10,+10).
Links / references
ZD: https://gitlab.zendesk.com/agent/tickets/83662
Gerrit documentation for similar feature: https://gerrit-review.googlesource.com/Documentation/config-labels.html
Documentation blurb
Create categories with scoring that can prohibit Merge Request approval.
Overview
What is it?
- Customizable scoring options for merge requests Why should someone use this feature?
- To improve quality of merge requests while avoiding "absolute" rules which can block an MR What is the underlying (business) problem?
- Current approval/disapproval doesn't provide enough granularity for the customer. How do you use this feature?
- Add voting labels that feature their own scoring system with an option to prevent MR's with low accumulated scores from being passed.
Use cases
Who is this for? Provide one or more use cases.
All customers that want more granularity in their Merge Request process.
Customers that want to approve MR's based on accumulated a scoring of different rules.
Feature checklist
Make sure these are completed before closing the issue, with a link to the relevant commit.
-
Feature assurance -
Documentation -
Added to features.yml