Skip to content

feat(codeowners): Display exclusion rules in ownership rules table#115391

Merged
shashjar merged 1 commit into
masterfrom
shashjar/display-exclusion-rules-in-ownership-rules-table
May 12, 2026
Merged

feat(codeowners): Display exclusion rules in ownership rules table#115391
shashjar merged 1 commit into
masterfrom
shashjar/display-exclusion-rules-in-ownership-rules-table

Conversation

@shashjar
Copy link
Copy Markdown
Member

@shashjar shashjar commented May 12, 2026

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.

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 12, 2026
@github-actions
Copy link
Copy Markdown
Contributor

📊 Type Coverage Diff

✅ No new type safety issues introduced. Coverage: 93.49%

@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 12, 2026

ID-243

@shashjar shashjar requested a review from a team May 12, 2026 18:01
@shashjar shashjar marked this pull request as ready for review May 12, 2026 18:01
@shashjar shashjar requested a review from a team as a code owner May 12, 2026 18:01
@shashjar shashjar removed the request for review from a team May 12, 2026 18:02
@shashjar shashjar merged commit b406afc into master May 12, 2026
76 of 77 checks passed
@shashjar shashjar deleted the shashjar/display-exclusion-rules-in-ownership-rules-table branch May 12, 2026 18:32
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants