[go: up one dir, main page]

Skip to content

Code Owners still show as optional when Inviting subgroups to projects in parent groups

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

Subgroups invited to a project cannot be made required for approvals despite following the diagram outline in our documentation: https://docs.gitlab.com/ee/user/project/codeowners/index.html#inviting-subgroups-to-projects-in-parent-groups

Users of the subgroup will appear as approvers, but they are configured as optional.

Steps to reproduce

  1. From Group A, create a sub-group B

  2. From Group A, create Project A

  3. In Project A, add sub-group B with Developer role

  4. In Project A, create a code owners file with required codeowners. Example

    [GENERAL]
    CODEOWNERS @youruser
    
    [README owners][2]
    README.md @group-a/sub-group-b
  5. Create a new branch and edit README.md

  6. Create a merge request

Result: Approvers are listed in the merge request as optional

Expectation: 2 approvals would be required from sub-group-b following the syntax

Note: Adding approval requirement to a protected branch will list the group approval as required, but there is not way to do this on unprotected branches. Per our documentation, to make a group optional, you would specify this by adding ^ at the beginning of the section, which is not done.

Example Project

https://gitlab.com/irisb_ultimate_group/project-a-zd-559894

What is the current bug behavior?

Approvers are still listed as optional

What is the expected correct behavior?

Approvers would be listed as required

Relevant logs and/or screenshots

Some troubleshooting in internal issue: https://gitlab.com/gitlab-com/support/fieldnotes/-/issues/769

Related Feature Request for CODEOWNER inheritance to groups: #288851

Output of checks

This bug happens on GitLab.com

Possible fixes

Edited by 🤖 GitLab Bot 🤖