Skip to content

Include release notes link in major version upgrade notification#7236

Open
alfonso-noriega wants to merge 1 commit intomainfrom
include-release-notes-in-major-version-notification
Open

Include release notes link in major version upgrade notification#7236
alfonso-noriega wants to merge 1 commit intomainfrom
include-release-notes-in-major-version-notification

Conversation

@alfonso-noriega
Copy link
Copy Markdown
Contributor

Summary

Implements Option A from https://github.com/shop/issues-develop/issues/22372.

When isMajorVersionChange() returns true, the upgrade notification now includes a link to the GitHub release notes so users can review breaking changes before deciding to upgrade.

Before:

💡 Version 4.0.0 available! Run brew upgrade shopify-cli

After:

💡 Version 4.0.0 available! Run brew upgrade shopify-cli

⚠️  This is a major version — review breaking changes before upgrading:
   https://github.com/Shopify/cli/releases/tag/v4.0.0

Changes

  • packages/cli-kit/src/public/node/upgrade.ts — extended getOutputUpdateCLIReminder(version, isMajor = false) to append the GitHub release URL when isMajor is true
  • packages/cli-kit/src/public/node/hooks/postrun.ts — pass true as isMajor to getOutputUpdateCLIReminder when a major version change is detected

Test plan

  • Unit tests added for getOutputUpdateCLIReminder: major version includes URL, minor/patch does not
  • Updated autoUpgradeIfNeeded test to assert getOutputUpdateCLIReminder is called with isMajor: true for major bumps
  • Type-check passes (pnpm nx type-check cli-kit)
  • Lint passes (pnpm nx lint cli-kit)
  • All 25 tests pass

Closes https://github.com/shop/issues-develop/issues/22372

When isMajorVersionChange() is true, extend the notification to include
a link to the GitHub release notes so users can review breaking changes
before upgrading.

Closes shop/issues-develop#22372
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

Differences in type declarations

We detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:

  • Some seemingly private modules might be re-exported through public modules.
  • If the branch is behind main you might see odd diffs, rebase main into this branch.

New type declarations

We found no new type declarations in this PR

Existing type declarations

packages/cli-kit/dist/public/node/upgrade.d.ts
@@ -28,11 +28,14 @@ export declare function versionToAutoUpgrade(): string | undefined;
 export declare function warnIfUpgradeAvailable(): Promise<void>;
 /**
  * Generates a message to remind the user to update the CLI.
+ * For major version bumps, appends a link to the GitHub release notes so users
+ * can review breaking changes before deciding to upgrade.
  *
  * @param version - The version to update to.
+ * @param isMajor - Whether the version bump is a major version change.
  * @returns The message to remind the user to update the CLI.
  */
-export declare function getOutputUpdateCLIReminder(version: string): string;
+export declare function getOutputUpdateCLIReminder(version: string, isMajor?: boolean): string;
 /**
  * Prompts the user to enable or disable automatic upgrades, then persists their choice.
  *

@alfonso-noriega alfonso-noriega marked this pull request as ready for review April 9, 2026 20:35
@alfonso-noriega alfonso-noriega requested a review from a team as a code owner April 9, 2026 20:35
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.

1 participant