Gym
Gym copied to clipboard
ci: gate CI for external contributors behind copy-pr-bot approval
Summary
- Gate unit tests and code linting behind copy-pr-bot for external (fork) contributors, matching the NeMo-RL CI pattern
- Set
auto_sync_ready: falseso fork PRs require manual vetter approval via/ok to test <sha>before CI runs - Add
pushtrigger onpull-request/[0-9]+branches to unit-tests and code-linting workflows - Add cleanup workflow to delete
pull-request/NNNbranches when PRs close - Internal contributors pushing directly to the repo are unaffected — the
pull_requesttrigger remains
How it works
- External contributor opens a fork PR → lightweight checks (copyright, secrets, DCO) run automatically, but unit tests and linting do not
- A vetter comments
/ok to test <commit-sha>→ copy-pr-bot createspull-request/NNNbranch → unit tests and linting trigger viapush - When the PR is closed/merged → cleanup workflow deletes the
pull-request/NNNbranch
What changed
| File | Change |
|---|---|
.github/copy-pr-bot.yaml |
auto_sync_ready: false |
.github/workflows/unit-tests.yml |
Add push trigger for pull-request/[0-9]+, concurrency group, fix draft PR check for push events |
.github/workflows/code-linting.yml |
Add push trigger for pull-request/[0-9]+, concurrency group |
.github/workflows/clean-copy-pr-bot-branch.yml |
New — deletes pull-request/NNN branch on PR close |
Test plan
- [ ] Verify internal contributor PRs still trigger unit tests and linting via
pull_request - [ ] Open a test fork PR and confirm unit tests/linting do NOT run automatically
- [ ] Comment
/ok to test <sha>on the fork PR and confirm copy-pr-bot createspull-request/NNNbranch - [ ] Verify unit tests and linting trigger on the
pull-request/NNNpush - [ ] Close the PR and verify the
pull-request/NNNbranch is deleted
🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.6 [email protected]