feat(codeowners): Support excluding subdirectories via no-owner rules#115322
Merged
shashjar merged 2 commits intoMay 12, 2026
Merged
Conversation
shashjar
commented
May 11, 2026
| event_tag = ~r"tags.[^:]+" | ||
|
|
||
| owners = _ owner+ | ||
| owners = _ owner* |
Member
Author
There was a problem hiding this comment.
One or more owners —> zero or more owners
cvxluo
reviewed
May 11, 2026
Contributor
cvxluo
left a comment
There was a problem hiding this comment.
looks good overall. 2 questions:
- will we support this exclusion syntax for issue owners as well?
- will the frontend handle code owners with no owner properly?
Member
Author
|
cvxluo
approved these changes
May 12, 2026
shashjar
added a commit
that referenced
this pull request
May 12, 2026
…115391) Resolves https://linear.app/getsentry/issue/ID-243/codeowners-doesnt-support-excluding-subdirectories. Precursor to #115322. Displays CODEOWNERS exclusion rules in the ownership rules table, with the "No Owner" label. Always show exclusion rules regardless of the "My Teams" owner filter, since they affect all teams.
nikkikapadia
pushed a commit
that referenced
this pull request
May 12, 2026
…115391) Resolves https://linear.app/getsentry/issue/ID-243/codeowners-doesnt-support-excluding-subdirectories. Precursor to #115322. Displays CODEOWNERS exclusion rules in the ownership rules table, with the "No Owner" label. Always show exclusion rules regardless of the "My Teams" owner filter, since they affect all teams.
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves https://linear.app/getsentry/issue/ID-243/codeowners-doesnt-support-excluding-subdirectories.
Follow-up to #115391.
The CODEOWNERS spec (see below) allows for excluding ownership of subdirectories/specified paths by writing a rule with zero owners. With CODEOWNERS synced into Sentry, we are currently ignoring these no-owner rules. This PR implements that exclusion in ownership calculation.
We will continue to skip lines where owners exist but aren't mapped into Sentry. Our "last match wins" semantics remain.