[go: up one dir, main page]

Skip to content

Limit selected reviewers to only the selected reviewers eligible for a given rule

What does this MR do and why?

For #481798 (closed).

Uses a rule's rule.reviewers (selected reviewers eligible for this rule) to visually mask the set of displayed reviewers.

There are significant caveats: read more.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Before After
Screencast_from_2024-10-18_17-23-10 Screencast_from_2024-10-18_17-24-01

Additionally, the "Any eligible user" rule has special considerations, because it would normally filter out all users.

This video show that the special clause to exclude that filter from removing all reviewers is working.

Screencast_from_2024-10-21_14-32-42

How to set up and validate locally

  1. Enable the reviewer_assign_drawer feature flag ==> rails c; Feature.enable( :reviewer_assign_drawer )
  2. Set up CODEOWNERS for a file/path in an open MR
  3. Set up an approval rule for - for example - the target branch of your open MR
    • Ensure your CODEOWNERS rule and your approval rule are mutually exclusive
  4. Visit the MR
  5. Assign a user to one of the rules
  6. Open the reviewer dropdown for the other rule
    • Previously: All selected reviewers show
    • Now: Selected reviewers ineligible for a rule don't show for that dropdown
Edited by Thomas Randolph

Merge request reports

Loading