gh codespace commands now respect the following environment variables:
- GITHUB_SERVER_URL: typically "https://github.com"
- GITHUB_API_URL: typically "https://api.github.com"
- INTERNAL_VSCS_TARGET_URL: typically "https://online.visualstudio.com"
- GITHUB_TOKEN when CODESPACES is set, even if the host connecting to isn't "github.com".
This set of changes ensures that `gh codespace` commands automatically connect to the right API endpoints when gh is used within a codespace.
Co-authored-by: Mislav Marohnić <mislav@github.com>
* Rework logging, showing progress, and printing from `codespace` commands
* Change rendering of the general progress indicator so that it's visible on both dark and light backgrounds
* The progress indicator now "spins" faster
Co-authored-by: Mislav Marohnić <mislav@github.com>
Replace the implementation that relied on symlinks with the one that
create regular files that act like symlinks: they contain a reference to
the local directory where to find the extension.
This removes the false equivalence between GH_CONFIG_DIR and
XDG_CONFIG_HOME. These settings do not have the same effect and should
not be used for the same purposes.
Also remove the documentation about what `XDG_*` settings do. We simply
conform to the XDG Base Directory Specification, but will not document
it. It's likely that users of these environment variables already know
what they do.
Before:
$ GH_ENTERPRISE_TOKEN="..." gh pr create
could not find hosts config: not found
Now:
$ GH_ENTERPRISE_TOKEN="..." gh pr create
set the GH_HOST environment variable to specify which GitHub host to use
Also amends `gh help environment` documentation to suggest the use of
GH_HOST when scripting operations with GitHub Enterprise repositories.
- Extensions on Windows now enabled through the `sh.exe` interpreter
- `sh.exe` now found on Windows when git was installed via scoop
- `gh extensions list` command shows origin repo for the extension
- `gh extensions upgrade --all` is required to upgrade all extensions
- Added `gh extensions remove`
- Shell completions now include aliases and extension names
- `gh` help output now lists available extension names
- Extensions are stored to XDG_DATA_HOME