From 58c58917056a031241c4e4a32c93b785b91b84a8 Mon Sep 17 00:00:00 2001 From: Shrey Pandya Date: Thu, 11 Jun 2026 14:55:47 -0700 Subject: [PATCH] fix(ci): skip Stainless jobs for fork PRs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .github/workflows/stainless.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/stainless.yml b/.github/workflows/stainless.yml index 7775de7677..e271a5275d 100644 --- a/.github/workflows/stainless.yml +++ b/.github/workflows/stainless.yml @@ -19,7 +19,8 @@ env: jobs: preview: - if: github.event.action != 'closed' + # Fork PRs don't receive repo vars/secrets, so the Stainless action can only fail there + if: github.event.action != 'closed' && github.event.pull_request.head.repo.full_name == github.repository runs-on: ubuntu-latest permissions: contents: read @@ -40,7 +41,7 @@ jobs: config_path: stainless.yml merge: - if: github.event.action == 'closed' && github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main' + if: github.event.action == 'closed' && github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main' && github.event.pull_request.head.repo.full_name == github.repository runs-on: ubuntu-latest permissions: contents: read