Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 26, 2026

Plan: Add version upgrade functionality for actions/setup-cli

Problem Statement

The upgrade command should inspect existing copilot-setup-steps.yml file and upgrade the version number in any actions/setup-cli step.

Changes Completed

  • Investigate codebase and understand current behavior
  • Add version upgrade logic to copilot_setup.go
    • Created upgradeCopilotSetupSteps() function
    • Created upgradeSetupCliVersion() helper function
    • Refactored ensureCopilotSetupSteps() to support upgrade mode
  • Update upgrade command to call the new upgrade function
    • Added call to upgradeCopilotSetupSteps() in updateAgentFiles()
    • Added necessary imports (workflow package)
  • Add comprehensive tests for version upgrade scenario
    • TestUpgradeCopilotSetupSteps - upgrades v1.0.0 to v2.0.0
    • TestUpgradeCopilotSetupSteps_NoFile - creates file when missing
    • TestUpgradeCopilotSetupSteps_DevMode - skips dev mode files
    • TestUpgradeSetupCliVersion - tests helper function
  • Verify integration with upgrade command flow
  • Run tests and validate changes
    • All new tests pass ✅
    • All existing copilot_setup tests pass ✅
    • Upgrade command tests pass ✅
  • Manual testing
    • Release mode upgrade: v0.30.0 → current version ✅
    • Dev mode (curl): No changes (as expected) ✅
    • Workflow structure preserved ✅

Implementation Details

  • When upgrade command runs, it now upgrades versions in existing copilot-setup-steps.yml
  • Only upgrades actions/setup-cli steps in release mode
  • Dev mode (curl-based install) is not upgraded
  • Preserves existing workflow structure and other steps
  • Non-critical failure (warning) if upgrade fails

Manual Test Results

Test 1: Release mode upgrade

  • Before: uses: githubnext/gh-aw/actions/setup-cli@v0.30.0
  • After: uses: githubnext/gh-aw/actions/setup-cli@5b98ed1-dirty
  • Other steps preserved: ✅
  • Result: SUCCESS ✅

Test 2: Dev mode (curl-based)

  • Before: curl install script
  • After: No changes
  • Result: SUCCESS (correctly skipped) ✅
Original prompt

The "upgrade" command should inspect existing copilot-setup-setup .yl file and upgrad the version number in any actions/setup-cli step


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@pelikhan
Copy link
Contributor

@copilot you also need to update the "version" field value

…s.yml

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan pelikhan marked this pull request as ready for review January 26, 2026 02:23
@pelikhan pelikhan merged commit 56b9c1d into main Jan 26, 2026
50 checks passed
@pelikhan pelikhan deleted the copilot/upgrade-version-numbers branch January 26, 2026 02:24
Copilot AI requested a review from pelikhan January 26, 2026 02:24
Copilot stopped work on behalf of pelikhan due to an error January 26, 2026 02:24
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