Fix bug with approvers out of sync
What does this MR do and why?
Fix bug with approvers out of sync
- now that there are more than one policy action type, use Array.prototype.find instead of using a magic number to find 'require_approval' action
Changelog: fixed
EE: true
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
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Upload a GitLab Ultimate license
- Navigate to a project/group => Secure => Policies => New policy => Merge request approval policy
- Remove the approval action
- Add it back. It should now be second in the list of actions
- Add a user/group approver
- Navigate to yaml mode, add a new user/group approver id, navigate to rule mode
- Verify rule mode is disabled