Martin Kealey
e2b7ef4e26
Typo in generated ~/.config/gh/config.yml
2025-07-08 11:21:31 +10:00
Andy Feller
0180c7fce4
Restored original test setup, clarified
...
After discussing my previous change to the test, I'm restoring the previous keyring setup to reflect the specific situation.
I added clarifying comments to help the next reviewer.
2025-06-20 15:38:09 -04:00
Andy Feller
b7c2b19e70
Enhance Activetoken prioritize test
...
- ensure test user tokens are different from unkeyed token
- ensure assertion expected / actual are in correct order
2025-06-20 14:36:45 -04:00
Anuraag Agrawal
848cedd2c8
Push up
2025-06-18 09:56:44 +09:00
Anuraag Agrawal
cc9a2411e0
Cleanup
2025-05-29 12:28:26 +09:00
Anuraag Agrawal
f294a5f533
fix: get token for active user instead of blank if possible
2025-05-29 12:13:21 +09:00
Kynan Ware
138bccd437
feat(config): add accessible prompter and spinner
2025-04-22 16:50:58 -06:00
Andy Feller
ac95196748
Fix comment typo
2025-04-21 14:04:53 -04:00
Andy Feller
486c589665
PR feedback to improve config settings docs
2025-04-21 14:04:00 -04: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
Tyler McGoffin
81591a09b8
Use go-gh/auth package for IsEnterprise, IsTenancy, and NormalizeHostname
2024-10-15 11:56:43 -07:00
bagtoad
d24dfbeacf
Update comment formatting
2024-09-18 10:35:35 -06:00
bagtoad
e7403b89d0
Add HasActiveToken to AuthConfig.
...
Co-authored-by: William Martin <williammartin@users.noreply.github.com>
2024-09-18 08:42:19 -06:00
notomo
30b3286533
Add prefer_editor_prompt config
2024-07-09 21:01:50 +09:00
William Martin
85e81a50da
Comment further on config changes
2024-05-10 10:55:41 +02:00
William Martin
bc5329e9db
Fix mistaken find and replace for Option type
2024-05-10 10:48:45 +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
William Martin
f808dcee62
Expose CacheDir on Config
2024-04-05 14:58:12 +02:00
Bartek Pacia
32eeb63a85
redirect users to the gh environment command
2024-02-27 10:41:03 +01:00
Bartek Pacia
5d72e17246
Revert "make comments in the default config file more informative"
...
This reverts commit ef96b447d7 .
2024-02-27 10:33:15 +01:00
Bartek Pacia
ef96b447d7
make comments in the default config file more informative
2024-02-25 23:43:58 +01:00
Frederic Pillon
55d251ac51
Fix some typos raised by codespell
...
With .codespellignore containing:
aline
commitish
messag
noes
nwo
parth
prfiles
runn
timere
ue
welp
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
2024-01-17 15:34:49 +01:00
Sam Coe
52fb3b62b3
Update multi-account migration error msg ( #8448 )
...
* Make sure default host is stubbed out for all auth login tests
* Improve multi-account migration error message
2023-12-11 15:20:23 +00:00
Sam Coe
024cb939af
Rename authCfg.Token to authCfg.ActiveToken and authCfg.SetToken to authCfg.SetActiveToken
2023-12-06 14:06:28 +01:00
Sam Coe
1a3392a379
Rename authCfg.User to authCfg.ActiveUser
2023-12-06 14:06:28 +01:00
Sam Coe
8cdbc1a8ca
Refactor authCfg.UsersForHost to not return an error
2023-12-06 14:06:28 +01:00
William Martin
af8bcd3ed2
Print useful error when switch fails outside user control
2023-12-06 14:06:28 +01:00
William Martin
4e04b98f6f
Add user flag to auth token command
2023-12-06 14:06:28 +01:00
William Martin
7106129f65
Restore previous happy state on Switch failure
2023-12-06 14:06:28 +01:00
William Martin
ecfb226d5d
Fix linting errors
2023-12-06 14:06:28 +01:00
William Martin
8d53c9e55e
Only migrate oauth token under new user
2023-12-06 14:06:28 +01:00
William Martin
ab5103f061
Don't set user level git protocol and don't switch
2023-12-06 14:06:28 +01:00
William Martin
553b89f30c
Add tests for AuthConfig TokenForUser
2023-12-06 14:06:28 +01:00
William Martin
c9a6b7cc00
Always mock the keyring in NewIsolatedTestConfig
2023-12-06 14:06:28 +01:00
William Martin
8e89af96e8
Write tests for SwitchUser
2023-12-06 14:06:28 +01:00
William Martin
a0e5e4c709
Use NewIsolatedTestConfig in AuthConfig tests
2023-12-06 14:06:28 +01:00
Sam Coe
760dc91faa
Include environment variable users in auth status output
2023-12-06 14:06:28 +01:00
William Martin
e4ed4041cd
Use auth config and only print stdout in status
2023-12-06 14:06:28 +01:00
Sam Coe
eca5f72328
UX polish and standardization of language
2023-12-06 14:06:28 +01:00
William Martin
df274d4f3a
Implement auth switch
2023-12-06 14:06:28 +01:00
William Martin
72d5550407
Implemented auth logout for multiaccount
2023-12-06 14:06:28 +01:00
William Martin
1bf6023164
Display message when logging into existing account
2023-12-06 14:06:28 +01:00
William Martin
a9acece7dd
Split Login into adding a user and switching
...
It makes clear the steps that should be needed to "switch" which should be
shared between Login (add user and switch to it), Logout (remove user and switch
to another), and Switch (no modification and switch to a user)
2023-12-06 14:06:28 +01:00
William Martin
209aed30b4
Fix typo on migration comment
2023-12-06 14:06:28 +01:00
William Martin
a00294eff9
Fix double negatives in migration errors
2023-12-06 14:06:28 +01:00