Add all settings to all merge request approval policies
What does this MR do and why?
Add all settings
- previously the "merge request approval" settings were not allowed for policies that included only "Security Scan" and "License scan" rules, but the customers want the settings for any rule type because there is a limit on the number of policies that can be created
- add the "merge request approval" settings for all merge request approval policies
- ensure existing policies without settings set reflect that the settings can be added
- update tests
Changelog: changed
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.
Merge request approval type | Screenshot |
---|---|
Any merge request | |
Security | |
License | |
Existing Policy with no settings - any type |
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 => Secure => Policies => New policy => Merge request approval
- Verify the "Merge request approval settings" appear by default
- Change the rule type (e.g. Any merge request, Security scan, License scan)
- Verify the "Merge request approval settings" appear in all cases
- Navigate to yaml mode, delete the settings section, save the policy
- Navigate to the project => Secure => Policies => Select the new policy => Edit policy
- Verify the policy editor loads with all the settings deselected
Related to #464065 (closed)
Edited by Alexander Turinske