robertwbradford
robertwbradford

Reputation: 6585

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

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?

Upvotes: 4

Views: 3158

Answers (1)

spozun
spozun

Reputation: 882

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.

Upvotes: 3

Related Questions