Skip to content

feat(cli): add PR formatting to fern automations upgrade --json output#15771

Merged
lifanzou merged 4 commits intomainfrom
devin/1778112797-automations-upgrade-pr-format
May 7, 2026
Merged

feat(cli): add PR formatting to fern automations upgrade --json output#15771
lifanzou merged 4 commits intomainfrom
devin/1778112797-automations-upgrade-pr-format

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot commented May 7, 2026

Description

Extends fern automations upgrade --json to include a pr field with suggested PR title, body, and commitMessage. This lets the GHA upgrade action consume pre-formatted PR content directly from the CLI instead of re-deriving it — keeping all domain logic (version diffing, changelog URLs, PR formatting) in the CLI.

Changes Made

  • Added pr field (PrSuggestion | null) to AutomationsUpgradeResult — includes title, body, commitMessage when there are changes; null otherwise
  • Added buildPrTitle(), buildPrBody(), buildCommitMessage(), getShortGeneratorName() helper functions
  • PR title/body use (unicode) for readability in GitHub UI; commit messages use -> (ASCII) for compatibility with plain-text git tooling
  • Updated JSDoc comments in cli.ts and executeAutomationsUpgrade.ts to reflect the schema
  • Added changelog entry file

Testing

  • 30 unit tests covering all formatting helpers, schema contract, changelog URL derivation, and edge cases
  • Validated locally against fern-demo/sdk-preview-test-config with FERN_NO_VERSION_REDIRECTION=true
  • Pre-commit hooks pass

Merge order

This PR must merge and publish first. Then actions PR #9 can be merged.
"

Link to Devin session: https://app.devin.ai/sessions/0b0ff224ce294b938ff5c2f5aec943fd

Co-Authored-By: barry.zou <barry.zou@buildwithfern.com>
@devin-ai-integration devin-ai-integration Bot requested a review from amckinney as a code owner May 7, 2026 00:18
@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

devin-ai-integration Bot and others added 2 commits May 7, 2026 02:06
…commits, add schemaVersion

Co-Authored-By: barry.zou <barry.zou@buildwithfern.com>
Co-Authored-By: barry.zou <barry.zou@buildwithfern.com>
lifanzou

This comment was marked as spam.

@fern-api fern-api deleted a comment from devin-ai-integration Bot May 7, 2026
Co-Authored-By: barry.zou <barry.zou@buildwithfern.com>
@lifanzou lifanzou merged commit 159d8be into main May 7, 2026
60 checks passed
@lifanzou lifanzou deleted the devin/1778112797-automations-upgrade-pr-format branch May 7, 2026 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants