[FE] Add custom roles selector to policy editor

Why are we doing this work

As we introduce new custom roles, merge request approval policies could provide more granular support for defining these roles within an action. For example - when a security finding is detected, require approval from 2 users with custom security team role.

As a part of this issue we want to add a custom roles selector to the policy editor

type: approval_policy
actions:
  - type: require_approval
approvals_required: 1
role_approvers:
  - maintainer
  - 123

Relevant links

Non-functional requirements

  • Documentation:
  • Feature flag:
  • Performance:
  • Testing:

Implementation plan

Verification steps

  1. Upload a GitLab Ultimate
  2. Navigate to a project => Secure => Policies => New policy => Merge Request Approval Policy
  3. Select a role approver
  4. Verify the options available
  5. Select one or more roles
  6. Verify the options appear in yaml
  7. Repeat for a group
Edited by Sashi Kumar Kumaresan