[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
-
Use Group.memberRoles/Project.memberRolesgraphql API to show the custom roles associated -
Make request in role_select.vue similar to the other select components in that folder -
update yaml to reflect selection -
allow for multiple select
Verification steps
- Upload a GitLab Ultimate
- Navigate to a project => Secure => Policies => New policy => Merge Request Approval Policy
- Select a
roleapprover - Verify the options available
- Select one or more roles
- Verify the options appear in yaml
- Repeat for a group
Edited by Sashi Kumar Kumaresan