Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# CODEOWNERS
# Each line is a pattern followed by one or more owners.
# Owners are matched in order, last matching pattern wins.
#
# Standard: use the @petry-projects/org-leads team for all code owner
# assignments instead of listing individuals or bot accounts directly.
# This keeps CODEOWNERS files stable and centralizes membership management.
# See: standards/codeowners-standard.md

# Default owner for all files
* @don-petry @petry-projects-pr-review-agent @dependabot-automerge-petry
* @petry-projects/org-leads
42 changes: 42 additions & 0 deletions standards/codeowners-standard.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# CODEOWNERS Standard

**Status:** Active
**Applies to:** All repos in `petry-projects` org

## Rule

CODEOWNERS files MUST reference the `@petry-projects/org-leads` team rather than individual users or bot accounts.

Comment on lines +6 to +9
```text
# Default
* @petry-projects/org-leads
```

Path-specific rules MAY use additional teams or individuals when a narrower owner is appropriate, but the default `*` rule must always include `@petry-projects/org-leads`.

## Why

- **Stable CODEOWNERS files** — adding/removing an owner is a team membership change, not a multi-repo PR
- **CODEOWNERS support for automation** — GitHub Apps cannot be listed in CODEOWNERS
(platform limitation), but a machine user in the team can satisfy
`require_code_owner_review`. See [pr-review-agent issue #27](https://github.com/don-petry/pr-review-agent/issues/27)
- **Centralized control** — team membership is managed in one place via the org admin UI

## Team Composition

The `@petry-projects/org-leads` team contains:

- `@don-petry` — primary maintainer (team maintainer)
- `@donpetry-bot` — automation machine user (used by pr-review-agent and similar tooling)

Add additional human maintainers as needed. Bots/apps that need code owner standing should be machine user accounts added to this team, not GitHub Apps.

## Branch Protection

Repos that require code owner review must set `require_code_owner_review: true` on protected branches. Approvals from any member of `@petry-projects/org-leads` will satisfy the requirement.

## Migration

Repos still using individual owner lists should migrate via PR replacing the legacy `* @don-petry @petry-projects-pr-review-agent @dependabot-automerge-petry` line with `* @petry-projects/org-leads`.

The `petry-projects-pr-review-agent` GitHub App reference is non-functional (GitHub Apps cannot be CODEOWNERS) and should be removed during migration.
Loading