Gym icon indicating copy to clipboard operation
Gym copied to clipboard

ci: gate CI for external contributors behind copy-pr-bot approval

Open kajalj22 opened this issue 6 months ago • 1 comments

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: false so fork PRs require manual vetter approval via /ok to test <sha> before CI runs
  • Add push trigger on pull-request/[0-9]+ branches to unit-tests and code-linting workflows
  • Add cleanup workflow to delete pull-request/NNN branches when PRs close
  • Internal contributors pushing directly to the repo are unaffected — the pull_request trigger remains

How it works

  1. External contributor opens a fork PR → lightweight checks (copyright, secrets, DCO) run automatically, but unit tests and linting do not
  2. A vetter comments /ok to test <commit-sha> → copy-pr-bot creates pull-request/NNN branch → unit tests and linting trigger via push
  3. When the PR is closed/merged → cleanup workflow deletes the pull-request/NNN branch

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 creates pull-request/NNN branch
  • [ ] Verify unit tests and linting trigger on the pull-request/NNN push
  • [ ] Close the PR and verify the pull-request/NNN branch is deleted

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 [email protected]

kajalj22 avatar May 22 '26 22:05 kajalj22

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

copy-pr-bot[bot] avatar May 22 '26 22:05 copy-pr-bot[bot]