Skip to content

ci: allow fork pull requests without Generate SDK commits - #299

Merged
bhaveshpatel640 merged 9 commits into
mainfrom
AGE-1753
Aug 18, 2026
Merged

bhaveshpatel640 merged 9 commits into
mainfrom
AGE-1753

Conversation

@bhaveshpatel640

@bhaveshpatel640 bhaveshpatel640 commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

GitHub Apps cannot push to forks, so Generate SDK could not commit OpenAPI/SDK updates on fork PRs and checkout of the fork with the base token was unreliable. Unblock open-source contributions: fork PRs stay source-only; OpenAPI/SDK regenerate on main after merge (with a manual Actions fallback).

Related: AGE-1753

Changes

  • Split Generate SDK checkout: App-token writable checkout for same-repo / main / dispatch; fork PRs use base-repo pull refs
  • Skip Fern generate and commit when there is no App token (forks), so CI does not fail trying to push
  • Add workflow_dispatch for manual regen on main if the post-merge job misses or fails
  • Document the fork flow in CONTRIBUTING, README, and the PR checklist; clearer Actions notice/summary when a fork skip happens

How was this tested?

  • Reviewed workflow condition paths for fork vs same-repo vs push / workflow_dispatch
  • YAML parse check on .github/workflows/generate-sdk.yaml
  • Docs wording review for contributor vs maintainer ownership

Checklist

  • pnpm build, pnpm test, pnpm typecheck, pnpm lint:ci, and pnpm format:check pass locally
  • Tests added/updated where it makes sense
  • No hand-edits to generated code (packages/trueforge-sdk, .github/fern/openapi/openapi.json, docs/openapi.json)
  • Docs / .env.example updated if configuration or behavior changed

Note

Low Risk
CI and contributor-docs only; no runtime or API behavior changes. Fork PRs may briefly have stale generated artifacts until post-merge regen.

Overview
Generate SDK no longer tries to push OpenAPI/SDK commits on fork PRs (GitHub Apps cannot write to fork heads). Fork runs still check out the PR head via base-repo refs, run the regen gate, and pass without Fern generate/commit when there is no App token.

Same-repo PRs, main pushes, and manual workflow_dispatch keep the writable App-token checkout, pnpm sdk:generate, and bot commit flow. Job-level contents: write was removed in favor of default read permissions.

CONTRIBUTING, README, and the PR checklist now tell fork contributors to change source only and expect regeneration on main after merge, with a richer Actions step summary when a fork skip occurs.

Reviewed by Cursor Bugbot for commit dd6c2a1. Bugbot is set up for automated code reviews on this repo. Configure here.

@changeset-bot

changeset-bot Bot commented Aug 17, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: dd6c2a1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@bhaveshpatel640
bhaveshpatel640 enabled auto-merge (squash) August 18, 2026 06:11
@bhaveshpatel640
bhaveshpatel640 merged commit e14134c into main Aug 18, 2026
8 checks passed
@bhaveshpatel640
bhaveshpatel640 deleted the AGE-1753 branch August 18, 2026 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants