Add CODEOWNERS for automatic PR reviewer assignment#2825
Add CODEOWNERS for automatic PR reviewer assignment#2825
Conversation
Maps repository components to their primary maintainers based on git history and PR activity analysis, enabling GitHub to auto-assign reviewers on PRs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ebbe02e to
584b60f
Compare
|
@greptile |
Greptile SummaryAdded CODEOWNERS file to automatically assign reviewers based on component ownership. Maps core runtime files, plugins, infrastructure, and tooling to their primary maintainers. Issues Found:
Confidence Score: 3/5
Important Files Changed
Last reviewed commit: 584b60f |
savingoyal
left a comment
There was a problem hiding this comment.
Thanks! How is this file generated and kept fresh? Also given the small number of reviewers, do we need it at this point? I am okay either way as long as this file auto-updates.
Greptile SummaryThis PR introduces a distributed CODEOWNERS system using
Confidence Score: 4/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["Root CODEOWNERS\n(default owners)"] --> G["codeowners-generator"]
B["devtools/CODEOWNERS"] --> G
C["metaflow/*/CODEOWNERS\n(core modules)"] --> G
D["metaflow/plugins/*/CODEOWNERS\n(plugin modules)"] --> G
E["metaflow/cmd/CODEOWNERS\n(subdirectory overrides)"] --> G
F["metaflow/plugins/CODEOWNERS\n(file-specific rule)"] --> G
G -->|"generates"| H[".github/CODEOWNERS\n(merged output)"]
H -->|"used by"| I["GitHub PR\nReviewer Assignment"]
J["CI Workflow\ncodeowners.yml"] -->|"validates sync"| H
Last reviewed commit: 96af80e |
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Greptile SummaryIntroduces a distributed CODEOWNERS system using
Confidence Score: 4/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["Root CODEOWNERS\n(default owners)"] --> G["codeowners-generator"]
B["devtools/CODEOWNERS"] --> G
C["metaflow/*/CODEOWNERS\n(core modules)"] --> G
D["metaflow/plugins/*/CODEOWNERS\n(plugin modules)"] --> G
E["metaflow/cmd/CODEOWNERS\n(granular rules)"] --> G
F["metaflow/plugins/CODEOWNERS\n(file-specific rule)"] --> G
G -->|"generates"| H[".github/CODEOWNERS\n(aggregated output)"]
H -->|"used by"| I["GitHub PR\nauto-reviewer assignment"]
J["PR touches CODEOWNERS"] -->|"triggers"| K["codeowners.yml\nCI workflow"]
K -->|"npx codeowners-generator\ngenerate --check"| L{"In sync?"}
L -->|"Yes"| M["✓ Check passes"]
L -->|"No"| N["✗ Check fails"]
Last reviewed commit: b4d5e24 |
Add missing trailing newline to .github/CODEOWNERS and set permissions: read-all on the codeowners workflow for least-privilege.
Greptile SummaryThis PR introduces automated CODEOWNERS management using
Confidence Score: 4/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["Distributed CODEOWNERS files\n(34 files across repo)"] -->|"npx codeowners-generator generate"| B[".github/CODEOWNERS\n(auto-generated)"]
C[".codeowners-generatorrc\n(config: output path, includes)"] -->|configures| B
D["PR touches **/CODEOWNERS\nor .codeowners-generatorrc"] -->|triggers| E["codeowners.yml workflow"]
E -->|"npx codeowners-generator@2.4.0\ngenerate --check"| F{"Generated file\nup to date?"}
F -->|Yes| G["CI passes ✓"]
F -->|No| H["CI fails ✗\n(developer must regenerate)"]
B -->|"GitHub reads on PR"| I["Auto-assign reviewers\nbased on changed files"]
Last reviewed commit: 2b75d42 |
The previous commit manually adjusted formatting that didn't match what codeowners-generator produces, causing --check to fail in CI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Greptile SummaryThis PR introduces a distributed CODEOWNERS system using
Confidence Score: 4/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["Distributed CODEOWNERS files\n(34 files across repo)"] -->|"aggregated by"| B[".codeowners-generatorrc\n(config)"]
B -->|"generates"| C[".github/CODEOWNERS\n(GitHub-consumed file)"]
C -->|"used by"| D["GitHub PR auto-reviewer\nassignment"]
E["PR modifies any\nCODEOWNERS file"] -->|"triggers"| F[".github/workflows/codeowners.yml"]
F -->|"runs"| G["npx codeowners-generator@2.4.0\ngenerate --check"]
G -->|"verifies"| H{"Generated file\nin sync?"}
H -->|"Yes"| I["CI passes"]
H -->|"No"| J["CI fails —\nregeneration needed"]
Last reviewed commit: bf3ea34 |
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
|
Switched to distributed (colocated)
|
Greptile SummaryThis PR introduces a distributed CODEOWNERS system using codeowners-generator to auto-assign PR reviewers based on component ownership. Rather than maintaining a single monolithic CODEOWNERS file, ownership is defined in per-directory
Confidence Score: 4/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["PR touches **/CODEOWNERS or .codeowners-generatorrc"] --> B["CI: codeowners.yml triggered"]
B --> C["actions/checkout@v6"]
C --> D["npx codeowners-generator@2.4.0 generate --check"]
D --> E{"Generated .github/CODEOWNERS matches?"}
E -- Yes --> F["✅ Check passes"]
E -- No --> G["❌ Check fails — developer must regenerate"]
H["Developer edits per-directory CODEOWNERS"] --> I["Run: npx codeowners-generator generate"]
I --> J[".github/CODEOWNERS regenerated"]
J --> K["Commit both source + generated files"]
subgraph "Distributed Sources (35 files)"
S1["CODEOWNERS (root defaults)"]
S2["devtools/CODEOWNERS"]
S3["metaflow/*/CODEOWNERS"]
S4["metaflow/plugins/*/CODEOWNERS"]
end
S1 & S2 & S3 & S4 --> I
Last reviewed commit: cf17985 |
Maps repository components to their primary maintainers based on git history analysis, enabling GitHub to auto-assign reviewers on PRs.