Skip to content

Fix bug with approvers out of sync

Alexander Turinske requested to merge fix-bug-with-approvers-out-of-sync into master

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.

  1. Upload a GitLab Ultimate license
  2. Navigate to a project/group => Secure => Policies => New policy => Merge request approval policy
  3. Remove the approval action
  4. Add it back. It should now be second in the list of actions
  5. Add a user/group approver
  6. Navigate to yaml mode, add a new user/group approver id, navigate to rule mode
  7. Verify rule mode is disabled

Merge request reports

Loading