Skip to content

Examples of CODEOWNERS ! negation #19818

@jamesbraza

Description

@jamesbraza

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?

Currently for negation, there is one mention of it in the docs:

Using ! to negate a pattern

There should be an example showing a negation. I am struggling to figure out how to use this feature.

GitHub UI is saying "invalid pattern" for either of these:

!directory/* @some-owner
! directory/* @some-owner

I think an example would be a great way to spell out how to do negation.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    code ownersContent related to code ownerscontentThis issue or pull request belongs to the Docs Content teamrepositoriesContent related to repositorieswaiting for reviewIssue/PR is waiting for a writer's review

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions