How to ignore a file in GitHub CODEOWNERS while still having a wildcard

2.8k Views Asked by At

I'm hoping this is a really simple answer I've overlooked, but I have a repo on GitHub using CODEOWNERS and would like to do the following:

# Default reviewers except for the subsequently listed things:
* @global-owner1 @global-owner2

# Some other owners
/packages/something/ @octocat
/packages/another/ @doctocat

# PRs _only_ affecting the "Some other owners" paths will
# also include a change to the CHANGELOG.md, but I don't want
# @global-owner1 or @global-owner2 to be added on those PRs.
CHANGELOG.md

Is there a way to "ignore" the CHANGELOG.md file in this way?

1

There are 1 best solutions below

0
On

The file is read backwards, and the first match ends the search. So it seems like you don't need that last line, as the "some other owners paths" will get hit first.