Order of owners in codeowners file #23644
-
I have my codeowners file set up and grouped by teams, so something like this:
Who will be the owner of Note I don’t want teams sharing the ownership of that file, it should be owned solely by team-a. Is grouping by teams not the correct thing to do? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello @DenizTC and welcome to the community. Yes, order matters in the
DenizTC:
It isn’t specifically incorrect but it may mean that you’ll have to write more rules to achieve the same effect than if you worked with the way the
|
Beta Was this translation helpful? Give feedback.
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: