-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Priority
🟡 Minor - Team Workflow & Code Review
Location
Repository root - missing .github/CODEOWNERS
Problem Description
No CODEOWNERS file means code review assignments are manual and unstructured.
Current State
No .github/CODEOWNERS file - PRs require manual reviewer assignment, no automatic ownership rules.
Issues
1. Manual Reviewer Assignment
Every PR needs manual reviewer selection, forgets to assign reviewers, wrong reviewers assigned, time-consuming.
2. No Ownership Clarity
Who owns this code? src/core/compiler/, src/api/courses/, src/collections/
3. Critical Files Unprotected
Anyone can merge changes to next.config.mjs, src/lib/auth.ts, src/payload.config.ts
4. Onboarding Confusion
New contributors don't know who to ask, unclear who approves what, review responsibilities unclear.
Expected Behavior
.github/CODEOWNERS
Define code owners for each area of the codebase.
Benefits
Automatic Reviewer Assignment
When PR is created, GitHub automatically assigns reviewers based on files changed.
Required Approvals
Can require approval from specific CODEOWNERS for critical files.
Protection Rules
Critical files require approval from specific owners.
Steps to Fix
- Identify code owners for each area
- Create
.github/CODEOWNERS - Test with sample PR
- Document in contributing guide
- Set up branch protection rules
- Onboard team on new workflow
Team Structure Recommendations
For Small Teams (1-3 people)
* @founder @cto
/src/core/compiler/ @cto
For Medium Teams (4-10 people)
* @tech-lead
/src/core/compiler/ @backend-lead @tech-lead
/src/components/ @frontend-lead @tech-lead
/src/api/ @backend-lead @api-owner
Additional Context
CODEOWNERS is critical for:
- Large teams (10+ developers)
- Open source projects (external contributors)
- Security-sensitive code (auth, payments)
- Complex architectures (clear responsibilities)
Best Practices
- Keep owners updated: Review CODEOWNERS quarterly
- Avoid bottlenecks: Have backup owners for each area
- Be specific: More granular rules are better
- Document decisions: Explain why certain owners are needed
- Use teams: Prefer teams over individuals for scalability