Skip to content

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 Screenshot_2024-05-28_at_09.39.18
Security Screenshot_2024-05-28_at_09.39.10
License Screenshot_2024-05-28_at_09.39.03
Existing Policy with no settings - any type image

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Upload a GitLab Ultimate license
  2. Navigate to a project => Secure => Policies => New policy => Merge request approval
  3. Verify the "Merge request approval settings" appear by default
  4. Change the rule type (e.g. Any merge request, Security scan, License scan)
  5. Verify the "Merge request approval settings" appear in all cases
  6. Navigate to yaml mode, delete the settings section, save the policy
  7. Navigate to the project => Secure => Policies => Select the new policy => Edit policy
  8. Verify the policy editor loads with all the settings deselected

Related to #464065 (closed)

Edited by Alexander Turinske

Merge request reports