feat(codeowners): Display exclusion rules in ownership rules table#115391
Merged
shashjar merged 1 commit intoMay 12, 2026
Merged
Conversation
Contributor
📊 Type Coverage Diff✅ No new type safety issues introduced. Coverage: 93.49% |
scttcper
approved these changes
May 12, 2026
cvxluo
approved these changes
May 12, 2026
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.
shashjar
added a commit
that referenced
this pull request
May 12, 2026
…#115322) Resolves https://linear.app/getsentry/issue/ID-243/codeowners-doesnt-support-excluding-subdirectories. Follow-up to #115391. The [CODEOWNERS spec](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#example-of-a-codeowners-file) (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. ``` # In this example, @octocat owns any file in the `/apps` # directory in the root of your repository except for the `/apps/github` # subdirectory, as its owners are left empty. Without an owner, changes # to `apps/github` can be made with the approval of any user who has # write access to the repository. /apps/ @octocat /apps/github ``` We will continue to skip lines where owners exist but aren't mapped into Sentry. Our "last match wins" semantics remain.
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.
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.