Skip to content

CODEOWNERS file syntax documentation does not make it explicitly clear that a pattern can only be used once #17058

Closed
@ReidWeb

Description

@ReidWeb

[maintainer edit]
This issue is reserved for the MLH Fellowship program.

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners

What changes are you suggesting?

The existing documentation for file syntax does not make it explicitly clear that a pattern can only be specified once, and that if >1 instance of a pattern is present, the last instance will take precedence.

For example the following example would only request review from @doctocat, @octocat would not be included in the reviewers.

apps/ @octocat
apps/ @doctocat

I would propose that a line be added to the CODEOWNERS syntax section indicating that a repeated pattern is not supported.

Additional information

Additionally, I believe an issue should be raised internally against the validation of codeowners files - the above example will be marked as valid by the CODEOWNERS validation, and will not provide any indication to the end user that only the last instance of the pattern will be used.

Content plan

Found here

Metadata

Metadata

Assignees

No one assigned

    Labels

    MLH fellowshipThis issue is reserved for the MLH Fellowship programcode ownersContent related to code ownerscontentThis issue or pull request belongs to the Docs Content teamrepositoriesContent related to repositories

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions