githubgithub-codeowners

Exclude a file from a CODEOWNER file having global owners


I have a file structure like this:

       repo/
       |-- .github/CODEOWNERS 
       |-- .circleci/ 
       |-- app/ 
       |-- RELEASE.md
       |-- README.md

And my CODEOWNER file:

* @people1 @people2
/.circleci/ @people3 @people4
/app/ @people3 @people1

I want to make it to that RELEASE.md is excluded and the global owners review are not mandatory only for that file. Is this possible?


Solution

  • You can mention the file explicitly with no owners, which overrides the * pattern (last most specific match counts):

    * @people1 @people2
    /.circleci/ @people3 @people4
    /app/ @people3 @people1
    RELEASE.md