ci: run the test suite on external PRs into main - #219
Merged
Conversation
The suite only triggered on `pull_request` into `prod`, so every contributor PR targeting `main` merged with no automated verification — tests ran later, at release time, when main was promoted to prod. #215, #216 and #218 all sat mergeable with an empty status-check rollup. Add `main` to the trigger and gate the jobs: PRs into prod always run (that is the release gate, unchanged), PRs into main run only for outside contributions. Our own work — Rome-1's PRs, or any branch living in the Raftersecurity repo — is reviewed and tested locally before it is pushed, so re-running the full matrix would only burn runner minutes. Uses `pull_request`, not `pull_request_target`: fork PRs run with a read-only token and no secrets. Tests that need RAFTER_API_KEY already skip when it is absent, so a fork PR gets a clean green rather than a spurious failure.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The comprehensive suite only triggered on
pull_requestintoprod, so contributor PRs targetingmainmerged with no automated verification at all — #215, #216 and #218 each sat MERGEABLE with an empty status-check rollup, and the last workflow run in the repo was 2026-07-29. Tests only ran later, at release time, whenmainwas promoted toprod.What changed
mainadded to thepull_requesttrigger.gatejob decides who gets the suite; the 8 existing jobs depend on it.Policy, per request:
prod(release gate)mainfrom a fork / outside contributormainauthored byRome-1mainfrom a branch in theRaftersecurityrepoOur own work is reviewed and tested locally before it's pushed, so re-running the full matrix would only burn runner minutes.
Security notes
pull_request, notpull_request_target— fork PRs run with a read-only token and no access to secrets. There's a comment in the file saying so, because "fixing" that is the classic way to hand a fork repo-write credentials.env:rather than interpolating${{ }}straight into the shell script, so nothing attacker-controlled reaches the command line.secrets.RAFTER_API_KEY. The tests that need it already skip when it's absent (backend-api.test.tsskips by design; the local suite passes with 9 skips), so an external PR gets a clean green rather than a spurious failure.Verification
YAML parses; all 8 jobs carry
needs: gate+ theifcondition. This PR is itself from aRaftersecuritybranch, so by its own policy the suite will skip on it — I'll confirm the workflow still runs end-to-end with aworkflow_dispatchonce it's onmain.🤖 Generated with Claude Code