Commit graph

48 commits

Author SHA1 Message Date
Kynan Ware
ca46b56456
Merge pull request #11003 from cli/kw-bks/enclose-config-options-in-code-blocks
Fix formatting in allowed values for `gh config --help`
2025-05-22 10:14:14 -06:00
Kynan Ware
944543863a
Revert "[gh config] Escape pipe symbol in Long desc for website manual" 2025-05-20 08:54:30 -06:00
Kynan Ware
b639d6d514 doc(pr): format allowed values and defaults in help 2025-05-20 08:37:01 -06:00
Kynan Ware
138bccd437 feat(config): add accessible prompter and spinner 2025-04-22 16:50:58 -06:00
Andy Feller
f61961907e Update configuration support for accessible colors
- 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
2025-04-17 15:57:49 -04:00
Andy Feller
3eca268a7f Introduce color_labels support, update commands
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.
2025-04-02 18:24:20 -04:00
Azeem Sajid
33c30d5bd1 Inconsistent format of examples in help text 2025-02-27 16:26:25 +05:00
Azeem Sajid
a4b86bff77 Use HTML numeric code instead of escaping with slash 2025-02-04 18:48:56 +05:00
notomo
30b3286533 Add prefer_editor_prompt config 2024-07-09 21:01:50 +09:00
William Martin
88631d13d4 Remove unnecessary config list variable 2024-05-10 10:49:07 +02:00
William Martin
07e0ff7127 Fix repo fork to use remote protocol if none configured 2024-05-10 10:48:36 +02:00
William Martin
d0e436b369 Avoid reconstructing config Options on each use 2024-05-10 10:48:24 +02:00
William Martin
8a4f32b4e2 Make config list less fallible 2024-05-10 10:48:17 +02:00
William Martin
8a82e3a856 Provide more type safety around config values 2024-05-10 10:48:11 +02:00
William Martin
1d38230675
Move config interfaces into gh package (#9060) 2024-05-10 10:39:36 +02:00
Zack Sloane
d5f5732546
Update pkg/cmd/config/config.go
Co-authored-by: Andy Feller <andyfeller@github.com>
2024-01-23 13:26:48 -05:00
Zack Sloane
b6dadfa7fb test update, more consistent default value display 2024-01-08 23:23:24 -05:00
Sam Coe
024cb939af Rename authCfg.Token to authCfg.ActiveToken and authCfg.SetToken to authCfg.SetActiveToken 2023-12-06 14:06:28 +01:00
ffalor
7c2e5fd595
Add config clear-cache command (#7693) 2023-08-30 15:19:09 +00:00
Mislav Marohnić
db68dfa47b
config get: support getting oauth_token from keyring
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.
2023-03-09 16:35:07 +01:00
Sam Coe
c9a2d85793
Cleanup config.AuthToken and config.DefaultHost methods (#7049) 2023-02-28 00:24:45 +00:00
Sam Coe
cacff4ad6d
Use go-gh config package (#5771) 2022-06-23 11:50:04 +00:00
Håvard Anda Estensen
58cb773e09
Replace ioutil with io and os (#5498) 2022-04-26 13:07:44 +02:00
Christian Gregg
c5dbf20ed4
Alias list as ls for all commands (#5214)
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>
2022-02-17 13:53:42 +01:00
nate smith
0a619d422a undo overzealous find/replace 2022-01-14 15:27:05 -06:00
nate smith
562f1b3d0d add GetOrDefault functionality to config 2022-01-11 14:56:58 -06:00
meiji163
5b13decfb3 linter complains again 2021-11-16 10:43:25 -08:00
meiji163
8d82534461 simple printing 2021-11-16 10:39:22 -08:00
meiji163
5b7b4b8a71 linter not like FPrintf 2021-11-15 16:53:49 -08:00
meiji163
f5bb6e8476 fix host and add tests 2021-11-15 16:46:50 -08:00
meiji163
2843d32af0 init 2021-11-15 14:27:30 -08:00
Mislav Marohnić
11fbb60ae7 Rename the module to "github.com/cli/cli/v2" 2021-08-25 12:41:30 +02:00
Cristian Dominguez
867f38970f Fix USAGE help for some commands 2020-11-13 10:10:53 -03:00
Sam Coe
58b93e77fc
new packages for get and set subcommands 2020-11-03 09:49:06 +03:00
Sam Coe
5c5f52c4c4
Refactor config command 2020-11-03 09:49:05 +03:00
Mislav Marohnić
2d04292d44 Improve git config set git_protocol example
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`.
2020-10-26 14:42:24 +01:00
Mislav Marohnić
ae7d42a876 Centralize all known configuration options 2020-10-26 14:42:04 +01:00
Mislav Marohnić
ec64363085 Merge remote-tracking branch 'origin' into fix855 2020-10-26 14:05:49 +01:00
Mislav Marohnić
14a222bade Let the receiver choose how to format the cfg.Set() value error 2020-10-16 18:54:36 +00:00
AliabbasMerchant
8487a18169
Warn when an unknown config key is set 2020-10-13 15:56:54 +05:30
Mislav Marohnić
ae86361c25 Document gh config set pager ... option 2020-09-16 19:11:07 +02:00
Amanda Pinsker
db77f2dc66
Add examples 2020-09-14 12:42:13 -04:00
Amanda Pinsker
c3863e35b4
Add prompt to gh config help 2020-09-14 12:40:56 -04:00
Mislav Marohnić
c80292c2e8 Extend Config object with GITHUB_TOKEN support
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.
2020-09-07 21:33:26 +02:00
vilmibm
cba401deb0 check parent annotatiosn for auth skip 2020-08-19 10:21:19 -05:00
vilmibm
850a7ef243 print nice login message when no auth detected 2020-08-18 17:57:52 -05:00
Mislav Marohnić
a6e78d74de Merge branch 'pr-commands-isolate-3' into issue-commands-isolate 2020-08-11 15:40:05 +02:00
Mislav Marohnić
7f6d687629 Isolate config command 2020-08-07 16:59:23 +02:00