Skip to content

feat: extend CLI version checker to include gh-aw-firewall (AWF)#23713

Closed
Copilot wants to merge 1 commit intomainfrom
copilot/update-cli-version-checker
Closed

feat: extend CLI version checker to include gh-aw-firewall (AWF)#23713
Copilot wants to merge 1 commit intomainfrom
copilot/update-cli-version-checker

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 31, 2026

The CLI update checker only notified users about new gh-aw releases, leaving gh-aw-firewall (AWF) upgrades invisible — users had no way to know the bundled AWF version was stale.

Changes

  • checkForAWFUpdates() — queries repos/github/gh-aw-firewall/releases/latest and compares against constants.DefaultFirewallVersion; prints an info message pointing users to gh extension upgrade github/gh-aw when behind
  • Refactored checkForUpdates() — extracted gh-aw comparison into checkForGhAwUpdates(); AWF check now always runs independently (not gated on gh-aw being outdated)
  • Proper semver comparison — replaced lexicographic string comparison with golang.org/x/mod/semver.Compare() in both checkers (fixes v10.0.0 < v2.0.0 class of bugs in the original code)
  • Testability — added getLatestReleaseFunc / getLatestAWFReleaseFunc injectable vars, mirroring the existing getLastCheckFilePathFunc pattern; 6 new unit tests cover new/current/newer scenarios for both checks

When a new AWF release is available the user sees:

ℹ A new version of gh-aw-firewall is available: v0.26.0 (bundled: v0.25.4)
ℹ Update with: gh extension upgrade github/gh-aw

@pelikhan pelikhan closed this Mar 31, 2026
@github-actions github-actions Bot deleted the copilot/update-cli-version-checker branch April 13, 2026 02:59
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