Skip to content

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

Open
kajalj22 wants to merge 1 commit into
mainfrom
kajalj/copy-pr-bot-ci-gating
Open

ci: gate CI for external contributors behind copy-pr-bot approval#1399
kajalj22 wants to merge 1 commit into
mainfrom
kajalj/copy-pr-bot-ci-gating

Conversation

@kajalj22
Copy link
Copy Markdown
Contributor

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 noreply@anthropic.com

External contributor fork PRs now require a maintainer to approve via
copy-pr-bot before unit tests and linting run. Matches the NeMo-RL
pattern where CI only runs on `pull-request/NNN` branches.

Changes:
- Set copy-pr-bot `auto_sync_ready: false` (require manual vetter approval)
- Add `push` trigger on `pull-request/[0-9]+` branches to unit-tests and
  code-linting workflows (CI path for approved external PRs)
- Add concurrency groups to cancel stale runs
- Add cleanup workflow to delete `pull-request/NNN` branches on PR close

Internal contributors pushing directly to the repo are unaffected — the
`pull_request` trigger remains for non-fork PRs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Kajal Jain <kajalj@nvidia.com>
@kajalj22 kajalj22 requested a review from a team as a code owner May 22, 2026 22:39
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented May 22, 2026

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.

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.

1 participant