Skip to content

Add GitHub release URL to major version upgrade reminder#7236

Merged
alfonso-noriega merged 3 commits intomainfrom
include-release-notes-in-major-version-notification
Apr 13, 2026
Merged

Add GitHub release URL to major version upgrade reminder#7236
alfonso-noriega merged 3 commits intomainfrom
include-release-notes-in-major-version-notification

Conversation

@alfonso-noriega
Copy link
Copy Markdown
Contributor

@alfonso-noriega alfonso-noriega commented Apr 9, 2026

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/4.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

@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
alfonso-noriega and others added 3 commits April 10, 2026 16:56
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
@alfonso-noriega alfonso-noriega force-pushed the include-release-notes-in-major-version-notification branch from 9d42ac3 to 765a715 Compare April 10, 2026 16:21
Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link
Copy Markdown
Contributor

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 changed the title Include release notes link in major version upgrade notification ç Apr 13, 2026
@alfonso-noriega alfonso-noriega changed the title ç Add release notes link int major upgrade notification Apr 13, 2026
@alfonso-noriega alfonso-noriega changed the title Add release notes link int major upgrade notification Add GitHub release URL to major version upgrade reminder Apr 13, 2026
if (isMajor) {
const releaseUrl = `https://github.com/Shopify/cli/releases/tag/${version}`
const majorNotice =
outputContent`⚠️ This is a major version — review breaking changes before upgrading:\n ${outputToken.link(releaseUrl, releaseUrl)}`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
outputContent`⚠️ This is a major version — review breaking changes before upgrading:\n ${outputToken.link(releaseUrl, releaseUrl)}`
outputContent`⚠️ This is a major version change — review breaking changes before upgrading:\n ${outputToken.link(releaseUrl, releaseUrl)}`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also, have you checked that the warning symbol is properly shown on Windows/Linux and different terminals?

@alfonso-noriega alfonso-noriega added this pull request to the merge queue Apr 13, 2026
Merged via the queue into main with commit 2a9a556 Apr 13, 2026
25 checks passed
@alfonso-noriega alfonso-noriega deleted the include-release-notes-in-major-version-notification branch April 13, 2026 12:41
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