ci: fail fork PRs when generated OpenAPI/SDK are stale - #268
ci: fail fork PRs when generated OpenAPI/SDK are stale#268bhaveshpatel640 wants to merge 5 commits into
Conversation
e40550f to
e23f62b
Compare
d41827f to
649f3d6
Compare
7bc6e9e to
a8672c8
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a8672c8. Configure here.
|

Summary
Fail Generate SDK on fork PRs when OpenAPI/SDK output is stale, so public-repo contributors must commit
pnpm sdk:generatelocally (the App bot cannot push to forks). Also setcontents: readsince pushes use the App token.Closes AGE-1753
Changes
pnpm sdk:generateand print the dirty pathscontents: writeonGITHUB_TOKEN(contents: read)How was this tested?
pnpm sdk:generate+ commit of listed paths: Generate SDK passesChecklist
pnpm build,pnpm test,pnpm typecheck,pnpm lint:ci, andpnpm format:checkpass locallypackages/sdk,.github/fern/openapi/openapi.json,docs/openapi.json).env.exampleupdated if configuration or behavior changed — N/ANote
Low Risk
Workflow-only CI behavior for fork PRs and token permissions; no runtime application code changes.
Overview
Generate SDK no longer treats fork PRs as “generate succeeded, commit skipped.” When regen is required, fork PRs fail if
.github/fern/openapi,docs/openapi.json,packages/sdk, orpnpm-lock.yamlstill differ afterpnpm sdk:generate, with::error::instructions to runpnpm sdk:generate, optionallypnpm changeset:sdk-regen, and push to the fork. A passing fork run emits a notice reminding contributors to commit a changeset when SDK output changed.Job permissions drop
contents: writeon the default token and usecontents: read, since same-repo pushes go through the GitHub App token on the commit step.Reviewed by Cursor Bugbot for commit 241cff4. Bugbot is set up for automated code reviews on this repo. Configure here.