Skip to content

Make upgrade command version check non-blocking with GitHub API#14209

Merged
pelikhan merged 2 commits intomainfrom
copilot/check-release-upgrade-status
Feb 6, 2026
Merged

Make upgrade command version check non-blocking with GitHub API#14209
pelikhan merged 2 commits intomainfrom
copilot/check-release-upgrade-status

Conversation

Copy link
Contributor

Copilot AI commented Feb 6, 2026

The upgrade command now checks for newer releases via GitHub API and warns users without blocking execution. Previously used gh extension upgrade --dry-run which blocked upgrades when updates were available.

Changes

  • Modified ensureLatestExtensionVersion() to query repos/github/gh-aw/releases/latest via go-gh REST client
  • Changed from error to warning - returns nil even when newer version exists, allowing upgrade to proceed
  • Silent failure on all errors - network issues, auth failures, and blocked URLs no longer interrupt workflow
  • Added getLatestReleaseVersion() helper using existing Release type from update_check.go

Behavior

Before:

ERROR: gh-aw extension must be upgraded before running this command

(exits with error, blocks upgrade)

After:

⚠️  A newer version of gh-aw is available: v0.20.0 (current: v0.19.0)
ℹ️  Consider upgrading with: gh extension upgrade github/gh-aw

Updating agent and prompt files...

(shows warning, continues with upgrade)

Dev builds and pre-release versions skip the check entirely.

Original prompt

The upgrade command check if the current release matches the latest release of the extension and issue a warning if running gh extensions upgrade github/gh-aw is needed.
Fail silently if the release URL is not available or blocked.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@pelikhan pelikhan marked this pull request as ready for review February 6, 2026 18:46
Copilot AI review requested due to automatic review settings February 6, 2026 18:46
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…nings instead of errors

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add upgrade command to check latest extension release Make upgrade command version check non-blocking with GitHub API Feb 6, 2026
Copilot AI requested a review from pelikhan February 6, 2026 18:58
@pelikhan pelikhan merged commit f6178fe into main Feb 6, 2026
145 checks passed
@pelikhan pelikhan deleted the copilot/check-release-upgrade-status branch February 6, 2026 19:00
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