Skip to content

Display which approval rules match a given reviewer

Problem

With the introduction of #10294 (closed), a new dedicated "reviewer" section will be added to the MR page.

If I have created dedicated approval rules for this project/MR there is no way to know if any of the reviewers I've selected will satisfy the approval rules that have been created for this project/MR.

Proposal

  • As the "reviewer" list is displayed, show which approval rules are matched to the relevant allowed reviewer.
  • Show only the names of the approval rules that are applicable to the current MR.
  • Note that the current styling of the list needs to be tweaked so we can properly add this new information (see bold name and gray username).
  • If a user is not part of a specific approval rule, (for example, “Any eligible user”) don't display anything.
  • If a user is part of a Code Owners rule, simply display Code Owner
  • If a user matches multiple approval rules, only show the first rule name and add a counter at the end with the other rules: Really long appr… (+2 rules)

image

Edited by Pedro Moreira da Silva