Skip to content

Add CODEOWNERS for maintainer approval on contributor PRs#969

Open
northdpole wants to merge 2 commits into
mainfrom
chore/codeowners-branch-protection
Open

Add CODEOWNERS for maintainer approval on contributor PRs#969
northdpole wants to merge 2 commits into
mainfrom
chore/codeowners-branch-protection

Conversation

@northdpole

@northdpole northdpole commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Branch protection on main has require_code_owner_reviews: true but the repo had no .github/CODEOWNERS file. That meant no approval could satisfy the code-owner requirement on contributor PRs, forcing gh pr merge --admin.

This adds default code owners so maintainer approval is sufficient to merge other people's PRs. GitHub blocks authors from self-approving as a code owner, so maintainer-authored PRs still need a second reviewer.

Changes

  • Add .github/CODEOWNERS with default owners: @northdpole, @robvanderveer, @Pa04rth (Parth Sohaney), @paoga87 (Paola Garcia).

Expected behavior after merge

PR author Approver Merge allowed?
Contributor any listed CODEOWNER Yes
Any CODEOWNER self No
Any CODEOWNER different CODEOWNER Yes

Test plan

  • Merge this PR (needs another CODEOWNER — not self)
  • On a contributor PR, verify a single CODEOWNER approval enables merge without --admin

require_code_owner_reviews was enabled on main without a CODEOWNERS file,
so no approval could satisfy the code-owner requirement on contributor PRs.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Added a .github/CODEOWNERS file that assigns default owners for all repository paths and includes comments describing code owner review behavior on the main branch.

Changes

CODEOWNERS Setup

Layer / File(s) Summary
Define default code owners
.github/CODEOWNERS
Adds a global ownership rule for all paths with explanatory comments about code owner review requirements and self-approval behavior.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the main change: adding CODEOWNERS to enable maintainer approval for contributor PRs.
Description check ✅ Passed The description is directly related to the change and accurately explains the branch-protection and CODEOWNERS behavior.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/codeowners-branch-protection

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Expand default code owners so Parth Sohaney (@Pa04rth) and Paola
Garcia (@paoga87) can approve contributor PRs alongside existing
maintainers. Part of #969 / branch protection fix.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants