Skip to content

feat: add CODEOWNERS for automated review routing#41

Merged
abhizipstack merged 2 commits intomainfrom
fix/codeowners
Apr 8, 2026
Merged

feat: add CODEOWNERS for automated review routing#41
abhizipstack merged 2 commits intomainfrom
fix/codeowners

Conversation

@abhizipstack
Copy link
Copy Markdown
Contributor

What

  • Add .github/CODEOWNERS file for automated PR review assignment

Why

  • Branch protection has "Require CODEOWNERS review" enabled but no CODEOWNERS file exists — the setting has no effect
  • PRs need manual reviewer assignment every time
  • Different areas of the codebase should be reviewed by appropriate teams

How

Review routing based on file paths:

Path Reviewers Team members
Default (*) visitran-reviewers-l1 Tahier, Salahudeen, Deepak G
/backend/ L1 + visitran-reviewers-l2 + Jaseem, Ritwik, Abhishek, Hari
/frontend/ visitran-reviewers-l1 Tahier, Salahudeen, Deepak G
/visitran/ (core) visitran-reviewers-l2 Jaseem, Ritwik, Abhishek, Hari
/.github/, /docker/ visitran-admins Shuveb, Arun, Jaseem, Ritwik, Hari, Wicky, Mathumathi
/*.md, /docs/ visitran-reviewers-l1 Tahier, Salahudeen, Deepak G

Can this PR break any existing features. If yes, please list possible items. If no, please explain why. (PS: Admins do not merge the PR without this section filled)

  • No — adds a new file only. PRs will now automatically request reviews from the right teams instead of requiring manual assignment.

Database Migrations

  • None

Env Config

  • None

Notes on Testing

  • After merge: create a test PR touching backend/ — verify L1 + L2 reviewers are auto-requested

Checklist

I have read and understood the Contribution Guidelines.

Route PRs to appropriate reviewers based on file paths:
- Default: visitran-reviewers-l1 (Tahier, Salahudeen, Deepak G)
- Backend + Core: also visitran-reviewers-l2 (Jaseem, Ritwik, Abhishek, Hari)
- CI/CD + Docker: visitran-admins

Branch protection "Require CODEOWNERS review" is already enabled.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Apr 6, 2026

Greptile Summary

This PR introduces a .github/CODEOWNERS file to enable automated PR review routing in GitHub, addressing a gap where branch protection had "Require CODEOWNERS review" enabled but no corresponding file existed. The file defines six routing tiers — a * catch-all for L1, path-specific rules for backend/, frontend/, visitran/, tests/, and docs/ mapped to L1 and/or L2 teams, and infrastructure paths (/.github/, /docker/, /ci/) restricted to admins.

The implementation correctly uses last-match-wins semantics, and previous feedback (adding /ci/ to admin coverage, removing the redundant /*.md pattern, and adding L1 to the /visitran/ rule) has been incorporated. Two minor gaps remain:

  • PR description vs. file mismatch: The description table still lists /visitran/ as L2-only, while the actual file now correctly requires both L1 and L2. The table is stale.
  • pypi_server/ not explicitly covered: This directory contains visitran-pypi-server.yaml (a deployment/infrastructure config) and silently falls back to the * catch-all (L1 only). Given that docker/ and ci/ are explicitly routed to admins, pypi_server/ may warrant the same treatment.

Confidence Score: 5/5

Safe to merge — adds a new config file only with no runtime impact; all P0/P1 concerns from prior rounds are resolved.

All remaining findings are P2: a potentially missing explicit rule for pypi_server/ (falls to catch-all, not broken) and a stale PR description table. Neither blocks correctness or security. The file's routing logic is sound and prior feedback has been incorporated.

No files require special attention.

Vulnerabilities

No security concerns identified. The CODEOWNERS file restricts infrastructure paths (/.github/, /docker/, /ci/) to @Zipstack/visitran-admins, which correctly gates changes to sensitive pipeline and configuration files behind an elevated review tier.

Important Files Changed

Filename Overview
.github/CODEOWNERS New CODEOWNERS file with correct last-match-wins ordering; previous feedback (ci/ admin coverage, /*.md removal, visitran/ L1+L2) is fully addressed — minor gap for pypi_server/ and a stale PR description table entry remain.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    PR[Pull Request opened] --> MATCH{CODEOWNERS\nlast-match-wins}

    MATCH -->|"/.github/, /docker/, /ci/"| ADMIN["@Zipstack/visitran-admins\n(Shuveb, Arun, Jaseem, Ritwik, Hari, Wicky, Mathumathi)"]
    MATCH -->|"/backend/, /visitran/"| L1L2["@visitran-reviewers-l1\n+ @visitran-reviewers-l2\n(Tahier, Salahudeen, Deepak G\n+ Jaseem, Ritwik, Abhishek, Hari)"]
    MATCH -->|"/frontend/, /tests/, /docs/"| L1["@visitran-reviewers-l1\n(Tahier, Salahudeen, Deepak G)"]
    MATCH -->|"* (catch-all)\nincl. pypi_server/, .devcontainer/"| L1_DEFAULT["@visitran-reviewers-l1\n(Tahier, Salahudeen, Deepak G)"]

    ADMIN --> APPROVE[Approval required to merge]
    L1L2 --> APPROVE
    L1 --> APPROVE
    L1_DEFAULT --> APPROVE
Loading
Prompt To Fix All With AI
This is a comment left during a code review.
Path: .github/CODEOWNERS
Line: 17-19

Comment:
**`pypi_server/` may warrant admin coverage**

`pypi_server/visitran-pypi-server.yaml` is a deployment/infrastructure configuration file (a YAML manifest for the package server). It currently has no explicit rule and silently falls back to the `*` catch-all, routing review to L1 only.

Given that `docker/` and `ci/` are both explicitly assigned to `@Zipstack/visitran-admins` because of their infrastructure nature, `pypi_server/` looks like it belongs in the same category. Consider adding it alongside the other infrastructure paths:

```suggestion
/.github/ @Zipstack/visitran-admins
/docker/ @Zipstack/visitran-admins
/ci/ @Zipstack/visitran-admins
/pypi_server/ @Zipstack/visitran-admins
```

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: .github/CODEOWNERS
Line: 11

Comment:
**PR description table is stale for `/visitran/`**

The PR description's routing table still lists `/visitran/` as requiring only `visitran-reviewers-l2`. The actual file correctly requires both L1 and L2 (matching `/backend/`). The description table should be updated to reflect this so it doesn't mislead future readers tracing why a review was or wasn't requested.

How can I resolve this? If you propose a fix, please make it concise.

Reviews (2): Last reviewed commit: "fix: address Greptile review — CODEOWNER..." | Re-trigger Greptile

@abhizipstack abhizipstack self-assigned this Apr 7, 2026
- Add L1 to /visitran/ rule to match /backend/ policy (last-match-wins)
- Add /ci/ to admin-owned infrastructure paths
- Remove redundant /*.md rule (already covered by * catch-all)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@abhizipstack
Copy link
Copy Markdown
Contributor Author

All Greptile comments addressed in e0d6603:

  • P2 (ci/ not covered): Added /ci/ @Zipstack/visitran-admins
  • P2 (/*.md redundant): Removed — already covered by * catch-all
  • P2 (/visitran/ drops L1): Added L1 to match /backend/ policy

Copy link
Copy Markdown
Contributor

@wicky-zipstack wicky-zipstack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@abhizipstack abhizipstack merged commit 4600438 into main Apr 8, 2026
6 checks passed
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.

3 participants