[go: up one dir, main page]

Add disabled reviewer support for MR assignees and reviewers

What does this MR do and why?

This MR implements the ability to disable reviewers based on the disabledReason field, similar to the work_item_assignees implementation in MR !215603. This prevents certain users (like agents out of credits) from being assigned as reviewers while allowing already-assigned reviewers to be removed.

Changes

  • Update GraphQL query to include compositeIdentityEnforced field for MR permissions
  • Add disabled user filtering in reviewer dropdown component
  • Display disabledReason instead of username for disabled reviewers
  • Prevent disabled users from being selected in dropdown
  • Add visual styling for disabled reviewers with disabled text color
  • Update specs with disabled and status fields in mock data

How to test

  1. Set up a user with status.disabled = true and a disabledReason
  2. Open a merge request and try to add that user as a reviewer
  3. Verify the user appears with the disabled reason instead of their username
  4. Verify clicking on the disabled user doesn't add them as a reviewer
  5. If the user is already assigned, verify they can still be removed

Merge request reports

Loading