Acceptable CODEOWNERS Groups Should Inherit from Parent Group
Proposal
Currently, as per the CODEOWNERS documentation for the CODEOWNERS
file to reference a group it is not under you must first add that group to the project.
The documentation describes a situation like this:
group-x
├── subgroup-y
│ └── project-b
└── project-a
In this scenario, for @group-x/subgroup-y
to be a valid CODEOWNERS
target, that group must be first invited to project-a
.
However, given the following layout, where project-a
is instead a project that exists under subgroup-z
:
group-x
├── subgroup-y
│ └── project-b
└── subgroup-z
└── project-a
If subgroup-y
is invited to subgroup-z
, that group membership isn't inherited by project-a
and subgroup-y
must additionally be invited to project-a
.
I would like to propose that groups invited to other groups are inherited by their subprojects as CODEOWNERS
.
Real usecase:
group-x
├── engineering-group
├── datascience-group
└── product-group
├── project-a
└── project-b
In this case, both engineering-group
and datascience-group
contain no projects, and are only used to hold members. Both groups are invited to product-group
which contains common projects, but they still have to be added additionally to projects within product-group
for CODEOWNERS
to recognise @group-x/engineering-group
or @group-x/datascience-group
as valid targets.