codeowners-validator icon indicating copy to clipboard operation
codeowners-validator copied to clipboard

Multiple Owners check

Open micimize opened this issue 3 years ago • 2 comments

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.

micimize avatar Apr 20 '21 19:04 micimize

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.

cktaylor avatar Oct 05 '21 04:10 cktaylor

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

micimize avatar Oct 05 '21 16:10 micimize