gh-copilot icon indicating copy to clipboard operation
gh-copilot copied to clipboard

[FEAT]: Provide command to upgrade extension as part of the 'A new release of gh-copilot is available' notification

Open 0xdevalias opened this issue 1 year ago • 4 comments

Describe the need

When the extension reports that a new version is available, it would be nice if it also gave me an easily copy/pasteable command to update to that new version.

Currently it shows this:

A new release of gh-copilot is available: 1.0.0 → 1.0.1
https://github.com/github/gh-copilot/releases/tag/v1.0.1

Ideally it would show something like this so I don't have to remember how the CLI works and/or go and look at the --help every time:

A new release of gh-copilot is available: 1.0.0 → 1.0.1
https://github.com/github/gh-copilot/releases/tag/v1.0.1

To upgrade, run: gh extension upgrade gh-copilot

Version

Observed on 1.0.0

Relevant terminal output

See above.

0xdevalias avatar Mar 28 '24 06:03 0xdevalias

@0xdevalias : not a bad idea, I like it. 🤔

andyfeller avatar Mar 28 '24 19:03 andyfeller

Here's the specific format of the gh 'update available' text, may be cool to match it:

A new release of gh is available: 2.46.0 → 2.47.0
To upgrade, run: brew upgrade gh
https://github.com/cli/cli/releases/tag/v2.47.0

0xdevalias avatar Apr 06 '24 06:04 0xdevalias

In the meantime, how do I update the copilot extension manually? I'm on Windows.

ptrotter1 avatar May 01 '24 16:05 ptrotter1

how do I update the copilot extension manually

⇒ gh extension upgrade -h
Upgrade installed extensions

USAGE
  gh extension upgrade {<name> | --all} [flags]

FLAGS
  --all       Upgrade all extensions
  --dry-run   Only display upgrades
  --force     Force upgrade extension

INHERITED FLAGS
  --help   Show help for command

LEARN MORE
  Use `gh <command> <subcommand> --help` for more information about a command.
  Read the manual at https://cli.github.com/manual

So:

⇒ gh extension upgrade gh-copilot
[copilot]: upgraded from v1.0.1 to v1.0.2
✓ Successfully upgraded extension

0xdevalias avatar May 03 '24 09:05 0xdevalias