[STG-2257] fix(ci): skip Stainless jobs for fork PRs#2243
Merged
Conversation
Fork-triggered pull_request runs don't receive repo configuration variables or secrets, so STAINLESS_ORG/STAINLESS_PROJECT arrive empty and the Stainless action fails with 'Input required and not supplied: project' on every external PR (e.g. #2240/#2241). Skip both jobs when the head repo isn't browserbase/stagehand — claimed copies of external PRs run in-repo and still get full coverage. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
pirate
approved these changes
Jun 11, 2026
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.
Summary
Fork-triggered
pull_requestworkflow runs don't receive repo configuration variables or secrets, soSTAINLESS_ORG/STAINLESS_PROJECTarrive empty and the Stainless action dies immediately withInput required and not supplied: projecton every external-contributor PR. Seen on #2241 (claimed copy of #2240): the fork PR's failingpreviewcheck attached to the shared head SHA, leaving the claimed PR red through no fault of its own.This guards both jobs on
github.event.pull_request.head.repo.full_name == github.repository:preview— skips on fork PRs instead of failing. Claimed copies of external PRs run in-repo, so SDK preview coverage is preserved.merge— same defect: a directly-merged fork PR would trigger a guaranteed-failing merge build (still no vars/secrets on theclosedevent). Skipping is strictly better than failing; the claim flow means merged external work is always in-repo anyway.The
full_namecomparison is used instead of!head.repo.forkso a deleted fork repo (head.repo == null) skips rather than runs-and-fails.Linear: STG-2257
E2E Test Matrix
STAINLESS_ORG:andSTAINLESS_PROJECT:empty; action exits withError: Input required and not supplied: projectactionlint .github/workflows/stainless.ymlon this branchif:expression syntaxpreviewcheck on this PR (in-repo branch)🤖 Generated with Claude Code
Summary by cubic
Skip Stainless CI jobs for fork-origin PRs to avoid failures from missing repo vars/secrets. Keeps external PRs green while coverage runs on in-repo “claimed” copies. Addresses Linear STG-2257.
previewandmergeunlessgithub.event.pull_request.head.repo.full_name == github.repository;mergestill requires closed+merged intomain.full_namecheck to safely skip deleted forks (head.repocan be null).Written for commit 58c5891. Summary will update on new commits.