Commit graph

3 commits

Author SHA1 Message Date
William Martin
c50fb793ea Record official extension telemetry 2026-04-21 11:48:32 +02:00
William Martin
7ad1d7c0a1 Suggest and install official extensions via stub commands
Register hidden stub commands for official GitHub extensions (gh-aw,
gh-stack) that offer to install the extension when invoked. This
replaces the error-string-matching approach from the original PR with
proper cobra commands that:

- Avoid false-positive matches on flag values or post-'--' args
- Eliminate conflicting cobra 'Did you mean?' suggestions
- Properly propagate prompt/install errors for correct exit codes
- Are hidden from help output and shell completions
- Use GroupID "extension" so checkValidExtension allows installing over them
- Are registered after extensions and aliases so both take priority

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-16 17:58:37 +02:00
Kynan Ware
75909ed2ba Suggest and install official extensions for unknown commands
When a user runs an unknown command that matches a known official
extension (e.g. `gh stack` or `gh aw`), show an install suggestion.
In interactive TTY sessions, prompt the user to install it on the spot.

The official extension registry is hard-coded in pkg/extensions/.
Current entries are github/gh-aw and github/gh-stack. Teams can add
their extensions via PR. Install suggestions use an explicit github.com
host prefix for GHES compatibility.

Refs github/cli#220

Co-Authored-By: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-15 17:50:31 -06:00