Skip to content

Display which approval rules match a given reviewer (FE)

Samantha Ming requested to merge 233736-add-reviewer-approval-rules into master

Issue: #233736 (closed)

What does this MR do?

The reviewers dropdown will now display the approval rules the user is associated with.

  • Bold full name
  • Grey/Gray user name
  • Display approval rules (if applicable)

Testing Case

This feature is behind a feature flag, to turn on:

Feature.enable(:reviewer_approval_rules)

There are 2 areas to set approval rules:

  • Project level MR Rules
  • Specific MR Rules (overridden rules)

When the merge request is using project-level rules, the reviewers dropdown will display those of the project defaults. However, if the user has changed or adds rules at the merge request level, the reviewers dropdown will display those of the specific MR level.

A. Project Approval Rules

Docs: Instructions to add approval rules at project level

Example:

image

A-1. New MR

In the reviewers dropdown, you will see the project approval rules

image

A-2. Edit MR

In the reviewers dropdown, you will see the project approval rules

image

A-3. Sidebar

In the reviewers dropdown, you will see the project approval rules

image


B. Specific MR Approval Rules

Docs: Instructions to add approval rules at specific MR level

Example:

image

Make sure you save the change in order for the dropdown to be updated. Of course, this is not the best UX, there's a follow-up issue to ensure the effects will be dynamic on approval rule updates > Issue: #213796 (closed)

B-1. Edit MR

In the reviewers dropdown, you will see the MR specific approval rules

image

B-2. Sidebar

In the reviewers dropdown, you will see the MR specific approval rules

image


C. Reviewer Dropdown

The reviewer dropdown will be styled like so:

Non-Truncated Multiple Truncated
image image image

Assigness Dropdown

Note: there will be style changes to assignees but there will be NO display of approval rules associated with the users.

  1. Select Assignee(s)
  2. It will look like this:

Screenshots (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related to #233736 (closed)

Edited by Samantha Ming

Merge request reports