mszostok / codeowners-validator

The GitHub CODEOWNERS file validator
Apache License 2.0
217 stars 47 forks source link

Multiple Owners check #70

Open micimize opened 3 years ago

micimize commented 3 years ago

CODEOWNERS has a problematic behavior where a rule that specifies a single user will prevent that user from editing their owned code.

It would be nice to validate that there are no rules of the form /js @myjsguy to prevent this from happening, maybe via a multiowners flag.

cktaylor commented 2 years ago

It is mentioned in the linked thread - but to call it out explicitly, another situation to consider (that may be out of scope of this issue though) is that it is equally problematic if the CODEOWNERS rule specifies a single team and that team has a single user.

Given that codeowners-validator already has logic to talk to Github for team/org metadata - if it is possible to get team size from that, and if the proposed multiowners flag/mode is being added - I just wanted to point out this broader functionality would also be useful.

micimize commented 2 years ago

@cktaylor this is true, but a much harder thing to put guard rails on, as team size can change externally and cause issues