CODEOWNERS approvers not displayed as required on protected branches

Summary

When enabling CODEOWNERS approval on protected branches the approvals by code owners on merge requests are being displayed as optional, not required.

Steps to reproduce

  1. Create a group, subgroup, and project hierarchy similar to: group/subgroup/subgroup/project
  2. Create a CODEOWNERS file in the project with * @group/subgroupas a default global code owner.
  3. Modify the project's merge request approvals settings to require at least 1 approval.
  4. Enable CODEOWNERS approvals on protected branches.
  5. Commit a change to the repository and create a merge request against master.
  6. Observe that CODEOWNERS approvals are recognized but none are required.

Example Project

What is the current bug behavior?

CODEOWNERS approvals in merge requests are listed as optional approvers when a merge request is opened against a protected branch.

What is the expected correct behavior?

With 1 approval required by the project's settings, CODEOWNERS approvals should be listed as required when merge requests to protected branches are made.

Output of checks

This bug happens on GitLab.com: 12.7.0-pre 3598338b27b

ZD: https://gitlab.zendesk.com/agent/tickets/146783 (GitLab Internal)