- added support for `accessible_colors` configuration setting in `gh config` commandset
- updated default configuration file to contain `accessible_colors: disabled`
- add `GH_ACCESSIBLE_COLORS` env var to `gh environment`
- generated mocks via `go generate ./...` including previously missed prompter changes
This commit implements the actual changes around configuration setting / environment variable logic for displaying labels using their RGB hex color code in terminals with truecolor support.
One of the subtler changes in this commit is renaming generic ColorScheme.HexToRGB logic to render truecolor to ColorScheme.Label as this feature was being used exclusively for labels. This is due to confusion about introducing the new `color_labels` config on top of generic coloring logic.
Since we've advertised `gh config get -h HOST oauth_token` as an API for outside scripts and extensions to access the token, this should continue working even if the token was technically stored in keyring and not in the config file.
I always get tripped up whenever trying to list my codespaces, adding
`ls` as an alias to `list` feels natural enough.
Co-authored-by: Mislav Marohnić <mislav@github.com>
It's better to set this per-host in general, since setting the top-level
`git_protocol` key will not have any effect if the per-host setting
exists, and it does by default for anyone who ran `auth login`.
Adding GITHUB_TOKEN & GITHUB_ENTERPRISE_TOKEN support orthogonal to
Config was getting out of hand, especially in `auth` commands that
adjust their messaging and error status based on the presence of these
environment variables.
The new approach builds in support for tokens from environment straight
into Config object by composition. Thus, commands need not ever be
concerned with any specific environment variables.