From 84edb8e0d3d78a8b9fcd3c472a2a39a21c2b0c42 Mon Sep 17 00:00:00 2001 From: JosephBFlannery Date: Thu, 15 Jan 2026 18:19:02 -0500 Subject: [PATCH 1/2] ci: add monorepo SDK test trigger on pull requests Add a new job that triggers the flowglad monorepo test suite whenever a PR is opened in flowglad-node. This ensures that generated SDK versions are validated against the monorepo before publishing to npm. The job dispatches to the flowglad/flowglad repository with the PR commit hash, which the test-stainless-sdk workflow uses to fetch the corresponding SDK tarball from Stainless. Co-Authored-By: Claude Haiku 4.5 --- .github/workflows/ci.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0df5028..7d75a6c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,3 +86,19 @@ jobs: - name: Run tests run: ./scripts/test + + trigger-monorepo-tests: + timeout-minutes: 5 + name: trigger monorepo tests + runs-on: ubuntu-latest + needs: build + # Only run for PRs in the public repo, after the tarball is uploaded + if: github.repository == 'flowglad/flowglad-node' && github.event_name == 'pull_request' + steps: + - name: Trigger flowglad monorepo SDK tests + uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # v3.0.0 + with: + token: ${{ secrets.MONOREPO_DISPATCH_TOKEN }} + repository: flowglad/flowglad + event-type: test-stainless-sdk + client-payload: '{"commit_hash": "${{ github.event.pull_request.head.sha }}"}' From 7e3b9d93e9a247d3106eb1c788e4a20252d93fd6 Mon Sep 17 00:00:00 2001 From: JosephBFlannery Date: Fri, 23 Jan 2026 11:27:48 -0500 Subject: [PATCH 2/2] fix(ci): remove needs:build dependency from trigger job The build job only runs on push events or fork PRs, but Stainless PRs are same-repo PRs. This caused the trigger job to be skipped. Removed the dependency since the tarball is uploaded by Stainless's internal CI (stainless-sdks/flowglad-typescript), not by this repo's build job. By the time a PR is opened here, the tarball already exists. Co-Authored-By: Claude Opus 4.5 --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d75a6c..5907070 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -91,8 +91,9 @@ jobs: timeout-minutes: 5 name: trigger monorepo tests runs-on: ubuntu-latest - needs: build - # Only run for PRs in the public repo, after the tarball is uploaded + # Only run for PRs in the public repo + # Note: No 'needs: build' because the tarball is uploaded by Stainless's internal CI + # (stainless-sdks/flowglad-typescript), not by this repo's build job if: github.repository == 'flowglad/flowglad-node' && github.event_name == 'pull_request' steps: - name: Trigger flowglad monorepo SDK tests