Skip to content

CODEOWNERS Approval on Protected Branches is optional

Summary

When configuring Protected Branches approval by Code Owners with the Code owner approval toggle active the approval is still optional

Steps to reproduce

  1. Configure CODEOWNERS as described here: https://docs.gitlab.com/ee/user/project/protected_branches.html#protected-branches-approval-by-code-owners
  2. Make a change
  3. Verify the approvals in the MR

Example Project

What is the current bug behavior?

The Approval by CODEOWNERs is optional no matter what the configuration is.

What is the expected correct behavior?

If the Code owner approval toggle is active on a Protected Branch the approval should be mandatory.

Relevant logs and/or screenshots

Approval_Optional_-_2

Approval_Optional_-_3

Approval_optional-1

CODEOWNERS

Possible fixes