Skip to content

Add workflow to test community PRs via ok-to-test label#1279

Merged
skyamgarp merged 1 commit into
mainfrom
MODULES-11775-script
May 5, 2026
Merged

Add workflow to test community PRs via ok-to-test label#1279
skyamgarp merged 1 commit into
mainfrom
MODULES-11775-script

Conversation

@skyamgarp
Copy link
Copy Markdown

Summary

  • Adds a new GitHub Actions workflow (community_pr_test.yml) that triggers when a maintainer applies the ok-to-test label to a community (fork) PR
  • Creates a test PR from the fork's commits as a branch on the main repo, allowing CI to run with repository secrets
  • Notifies the original community PR if CI fails on the test PR

Details

  • Uses pull_request_target so GITHUB_TOKEN has write access and secrets are available
  • Verifies the labeler has write/maintain/admin access — removes the label and comments if not
  • Rebases onto main before pushing; comments on the PR if there are conflicts
  • Force-pushes the test branch on each label application to pick up new commits
  • A second job (notify-on-failure) listens for CI failures on community-pr-test-* branches and comments on the original PR

Test plan

  • Apply ok-to-test label as a maintainer on a fork PR — test PR should be created
  • Apply label as a triage collaborator — label should be removed with a comment
  • Apply label on a PR with merge conflicts — conflict comment should appear, no test PR created
  • Re-apply label after new commits — test branch should be force-pushed and test PR updated
  • Fail CI on a test PR — comment should appear on the original community PR

🤖 Generated with Claude Code

Creates a test PR against main from a fork's commits when a maintainer
applies the ok-to-test label, allowing CI to run with repository secrets.
Includes permission checks, conflict detection, and failure notifications.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@skyamgarp skyamgarp requested review from a team, bastelfreak and smortex as code owners May 5, 2026 02:37
@skyamgarp skyamgarp marked this pull request as draft May 5, 2026 02:38
@skyamgarp skyamgarp marked this pull request as ready for review May 5, 2026 02:52
@skyamgarp skyamgarp merged commit 537597b into main May 5, 2026
38 of 39 checks passed
@skyamgarp skyamgarp deleted the MODULES-11775-script branch May 5, 2026 08:08
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.

2 participants