split-pr
Split PR by CODEOWNERS Groups
Split a large pull request into multiple smaller PRs, where each PR touches
the fewest possible CODEOWNERS reviewer groups. The goal is to reduce review
burden: a PR that only touches megatron/core/ needs only the core reviewers,
while a PR that also touches examples/, tools/, and megatron/training/
pulls in many additional groups.
Workflow
1. Analyze the PR
- Fetch the PR details:
gh pr view <number> --repo NVIDIA/Megatron-LM --json title,body,headRefName,authorandgh pr diff <number> --repo NVIDIA/Megatron-LM --stat. Also determine the current GitHub user withgh api user --jq .login. - Parse
.github/CODEOWNERSto build a mapping from file path patterns to owner groups. - For each changed file in the PR, determine which CODEOWNERS groups would be required to review it.
- Build a summary table grouped by CODEOWNERS group, showing which files pull in which groups.
- Count the total number of distinct reviewer groups the PR currently requires.
2. Propose a split that minimizes reviewer groups per PR
More from nvidia/megatron-lm
respond-to-issue
Research and draft a response to a GitHub issue or question from an external contributor.
2create-issue
Investigate a failing GitHub Actions run or job and create a GitHub issue for the failure.
2build-and-dependency
Container-based dev environment setup and dependency management for Megatron-LM. Covers acquiring and launching the CI container, uv package management, and updating uv.lock.
2onboard-gb200-1node-tests
Onboard 1-node GitHub MR functional tests for GB200 from existing mr-scoped 2-node tests.
2cicd
CI/CD reference for Megatron-LM. Covers CI pipeline structure, PR scope labels, triggering internal GitLab CI, and CI failure investigation.
1testing
Test system for Megatron-LM. Covers test layout, recipe YAML structure, adding and running unit and functional tests, golden values, marker filters, and CI parity.
1