Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate that only a single CODEOWNERS file exists in the repository #97

Closed
cktaylor opened this issue Oct 5, 2021 · 1 comment · Fixed by #100
Closed

Validate that only a single CODEOWNERS file exists in the repository #97

cktaylor opened this issue Oct 5, 2021 · 1 comment · Fixed by #100

Comments

@cktaylor
Copy link

cktaylor commented Oct 5, 2021

Description

As you know Github documents that the CODEOWNERS file to be placed in the root, docs/, or .github/ directory of the repository.

It however does not state anything pertaining to whether multiple CODEOWNERS files exist.

What I have observed is that on Github CODEOWNERS is looked for in .github/ -> docs/ -> root order. However codeowners-validator prioritizes it in the reverse order.

We use Github's protected-branch logic that requires reviews from code owners, in order to ensure that owners are required to approve of changes to their code. However, we have realized that should an additional CODEOWNERS file get committed to a project, it could subvert that incidentally and be a source of future confusion.

Reasons

While the order preference of the possible file locations could be updated - I think it would be preferable to validate against the case of multiple CODEOWNERS files altogether.

There isn't any valid use-case for multiple CODEOWNERS files, and having codeowners-validator continue to be the sole point of CODEOWNERS related validation in our Github CI would be ideal.

I'm looking to see if there is positive reception to having this kind of validation added to the project - if so, I can see about creating a PR to do so.

@athtran
Copy link
Contributor

athtran commented Nov 23, 2021

I have a PR that addresses this issue: #100

@mszostok If you could take a look when you have time, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants