Skip to content

Order of owners in codeowners file #23644

Answered by lee-dohm
DenizTC asked this question in New to GitHub
Discussion options

You must be logged in to vote

Hello @DenizTC and welcome to the community.

Yes, order matters in the CODEOWNERS file, specifically lines that come later override lines that appear earlier in the file. In the example in the documentation, this is taken advantage of by starting with the least specific rule and then following with increasingly more specific rules as in this excerpt:

# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# @global-owner1 and @global-owner2 will be requested for
# review when someone opens a pull request.
*       @global-owner1 @global-owner2

Order is important; the last matching pattern takes the most

precedence. When someone opens a…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants