Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 773
robertwbradford Avatar asked Oct 27 '25 20:10

robertwbradford


1 Answers

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.

like image 121
spozun Avatar answered Oct 30 '25 10:10

spozun