feat(upgrade): implement fern-upgrade GitHub Action as composite#9
Draft
feat(upgrade): implement fern-upgrade GitHub Action as composite#9
Conversation
Implements end-to-end fern-upgrade action that automates Fern CLI and generator version upgrades. Runs `fern upgrade` and `fern generator upgrade`, detects changes by diffing config files before/after, and opens or updates a shared PR on the `fern/upgrade` branch. - Add version-diff module for parsing fern.config.json and generators.yml - Add PR management with clean-slate branch strategy (force push) - Add PR title/body generation with changelog links from FDR - Add github-token input with default GITHUB_TOKEN fallback - Add CLI version resolution (auto/latest/inherit/specific) - Stub telemetry (FER-9668) and automation config (FER-9669) as TODOs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the Node.js action (TypeScript + tsup bundle) with a composite action to align with the repo's architectural pattern where actions are thin shell wrappers around CLI commands. - Rewrite action.yml from `using: node20` to `using: composite` - Add scripts/snapshot.js for version capture (plain JS, no npm deps) - Add scripts/diff.js for diff computation + PR content generation - Reuse resolve-cli composite action for CLI version resolution - Use gh CLI for PR management instead of @actions/github - Delete all TypeScript source, tests, dist bundle, and build config - Remove upgrade from pnpm workspace (no package.json needed) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the
fern-upgradeGitHub Action (FER-9674) as a composite action, aligning with the repo's architectural pattern where actions are thin shell wrappers around CLI commands (likesync-openapi,resolve-cli,setup-cli).fern upgrade --yesandfern generator upgrade --yesvia the resolved CLIfern.config.json+generators.ymlbefore/afterfern/upgradebranch with changelog linksresolve-clifor CLI resolution,ghCLI for PR management, plain JS helper scripts for version diffingArchitecture
No
package.json, nodist/bundle, no TypeScript build — justaction.yml+ helper scripts.Stubs
Test plan
snapshot.jstested with single-API and multi-API fixturesdiff.jstested with CLI upgrade, generator upgrade, and combined scenariosfern.config.json+generators.yml🤖 Generated with Claude Code