-
Notifications
You must be signed in to change notification settings - Fork 1
ci: add monorepo SDK test trigger on pull requests #176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
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 <noreply@anthropic.com>
📝 WalkthroughWalkthroughAdds a GitHub Actions job Changes
Sequence Diagram(s)sequenceDiagram
participant PR as "Pull Request (repo A)"
participant CI as "GitHub Actions (ci.yml)"
participant Dispatch as "repository-dispatch action"
participant RepoB as "Monorepo (repo B) / Test Runner"
PR->>CI: PR opened / updated (public repo)
CI->>Dispatch: invoke repository-dispatch (event: test-stainless-sdk, payload: head SHA)
Dispatch->>RepoB: send repository_dispatch event with payload
RepoB->>RepoB: kickoff monorepo tests
RepoB-->>CI: (optional) report results / status via GitHub APIs
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @.github/workflows/ci.yml:
- Around line 90-96: The trigger-monorepo-tests job is skipped because it
declares needs: build while the build job’s if prevents it from running on
same-repo pull_request runs; either make the build job run for pull_request or
remove the dependency so the dispatch can run. Fix by updating the build job’s
conditional to include pull_request (e.g., ensure the build job’s if allows
github.event_name == 'pull_request') or remove/replace needs: build from the
trigger-monorepo-tests job so it does not depend on build; reference the job
names trigger-monorepo-tests and build when making the change.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/ci.yml
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
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 <noreply@anthropic.com>
Add a new GitHub Actions job that automatically triggers the monorepo test suite whenever a PR is opened in flowglad-node. This validates that Stainless-generated SDK versions don't break the monorepo before publishing to npm.
The job dispatches to flowglad/flowglad with the PR commit hash, which the test-stainless-sdk workflow uses to fetch the corresponding SDK tarball from Stainless and run the full test suite.
This requires setting up a
MONOREPO_DISPATCH_TOKENsecret (a GitHub PAT withreposcope) in the flowglad-node repository secrets.Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.