CODEOWNERS needs more than read permission

Hello,

We have added this CODEOWNERS to our repository, however, it does not work as expected, it does not add anyone as reviewer.

The official documentation says:

The people you choose as code owners must have read permissions for the repository. When the code owner is a team, that team must be visible and it must have write permissions, even if all the individual members of the team already have write permissions directly, through organization membership, or through another team membership.

We are only adding people, not teams, so they ONLY need READ permission, not write.

However, as you can read on our code owners file:

This CODEOWNERS file contains errors …

Unknown owner on line 20: make sure @ericLemanissier exists and has write access to the repository

The user name is correct, and it respects the case-sensitive rule, so it exists. Why does it need write access if the documentation says the opposite? What is missing?

Plus, the documentation is not clear about read permission, do we need to enter at settings/access and add each user with read permission explicitly?

1 Like

There doesn’t appear to be a good place to send feedback for CODEOWNERS…

Here’s a dormant item:

I’d suggest filing a ticket to:

On the docs side, if I were you, I’d file a bug:

Fwiw, if I could speak to the CODEOWNERS folks, I’d note that their error message is bad…
specifically github doesn’t try to hide the existence of users/orgs –

One can visit:
https://github.com/.keys to confirm the existence of a thing.

Consider:
https://github.com/no-such-thing.keys
which is currently 404 and indicates that at the present there is neither a user nor an organization named no-such-thing.
One could also visit
https://api.github.com/users/no-such-thing and https://api.github.com/orgs/no-such-thing to get the same information, but that takes two API requests, and why bother :slightly_smiling_face: .

Thus, they can safely either say:

This CODEOWNERS file contains errors …
Unknown owner on line 20: @no-such-thing does not exist
Because the nonexistence of no-such-thing is not a secret.

And, since we know that ericLemanissier exists, they can simply report:

Designated owner isn’t sufficiently privileged on line 20: @ericLemanissier does not have write access to the repository

* I can’t think of a great adjective for owner.

Thank you for your answer!

That user, eric, is just an example. There are more people listed and no one was requested as reviewer. It’s something more related to the feature, not the user permission.

I’ll open a ticket on support page. Thank you for your advice.