Where is the logic how CODEOWNERS works on auto assigning? #23356
-
I’d like to ask the situation when PR matches multiple distinguished rules. Said that we have a CODEOWNERS files like:
If someone make a PR touches both JS files and docs folder, is GitHub choose only And further, I don’t see a detailed spec describes all these cases how CODEOWNERS file would work. Please DO NOT send me this links, they roughly say little about details. If I want to use it, I’d like to understand most of its behaviors. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
This comment was marked as off-topic.
This comment was marked as off-topic.
-
What if there is nothing about order, I mean, a PR touch
It is my case. Possibly a PR may touch a wide range of file and I’d like to merge CODEOWNERS as many as possible, so that less people be notified (disturbed). |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
works for one sort of matches, but what if I have two sort of matches. |
Beta Was this translation helpful? Give feedback.
-
My understanding is that if multiple owner rules are matched, an owner from each rule is required to review the PR. So if Note that each rule is combined with “or,” not “and” |
Beta Was this translation helpful? Give feedback.
-
Yep. That sounds correct. I’ve dropped CODEOWNERS file and think this is the solution. Close with a like solution. Thanks for your advice @micimize ! |
Beta Was this translation helpful? Give feedback.
My understanding is that if multiple owner rules are matched, an owner from each rule is required to review the PR. So if
index.js
anddocs/index.md
are both edited, either@bar
or both@foo
and@baz
must review the PR.Note that each rule is combined with “or,” not “and”