Commit graph

3263 commits

Author SHA1 Message Date
Sam Coe
94de5290e0
Auth switch special case one host with two users to avoid unnecessary prompting 2023-12-07 09:44:07 -04:00
William Martin
0763c1d4a7 Locally prevent mixup of username and token in refresh 2023-12-07 11:43:05 +01:00
William Martin
16cfe5f21a Fix token username return ordering in auth refresh 2023-12-07 11:35:02 +01:00
Sam Coe
fd7dc25e2a
Add error to auth refresh when active user does not match newly authenticated token user 2023-12-06 16:51:48 -04:00
Sam Coe
80fc413592 Polish auth status timeout error message 2023-12-06 14:06:28 +01: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
Sam Coe
92a902e453 Add context to auth token command error message 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
dbff555835 Update auth token short and long 2023-12-06 14:06:28 +01:00
William Martin
2c72647cf7 Update git protocol login prompt to indicate it is host level 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
ecfb226d5d Fix linting errors 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
08c659bdf8 Document that git protocol during login is host level 2023-12-06 14:06:28 +01:00
Sam Coe
587007a562 Additional auth status tests 2023-12-06 14:06:28 +01:00
William Martin
15ba536317 Ensure subtests use the right t during setup 2023-12-06 14:06:28 +01:00
William Martin
c165d5ccc0 Use isolated config in logout cmd tests 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
0a7871c6d3 Use real config in setupgit cmd tests 2023-12-06 14:06:28 +01:00
William Martin
20dd95b88d Use real config in token cmd tests 2023-12-06 14:06:28 +01:00
William Martin
748d59ec64 Use real config in auth refresh tests 2023-12-06 14:06:28 +01:00
William Martin
239f983ad4 Use real config in auth check tests 2023-12-06 14:06:28 +01:00
William Martin
dc0f6d55e2 Use real config in fork cmd tests 2023-12-06 14:06:28 +01:00
William Martin
5b3e7290be Use real config and env in login cmd tests 2023-12-06 14:06:28 +01:00
Sam Coe
e806664ef7 New UX for auth status 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
b2997cc7bd Handle multi account golden path in auth status 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
William Martin
5d10beb60a Use config to look up user for status 2023-12-06 14:06:28 +01:00
William Martin
08c7bd1df2 Use real config and login in status tests 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
98381e63c9 Refactor switch test to be more structural 2023-12-06 14:06:28 +01:00
William Martin
7667fbdb5a Handle logout having no candidates 2023-12-06 14:06:28 +01:00
William Martin
df274d4f3a Implement auth switch 2023-12-06 14:06:28 +01:00
Sam Coe
2fc6dbd851 Add user flag to auth logout command 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
c4fcf9ba1a Add test to ensure login command allows multiple users 2023-12-06 14:06:28 +01:00
Sam Coe
38b73e3f85 Set host level git_protocol on login 2023-12-06 14:06:28 +01:00
Sam Coe
68e30beac4 Logout removes token from keyring using username 2023-12-06 14:06:28 +01:00
Sam Coe
d8084f5f6d Hide all keyring package implementation inside internal keyring package 2023-12-06 14:06:28 +01:00
William Martin
9efa7248a9 Initial multi-account migration work 2023-12-06 14:06:28 +01:00
Zach Steindler
6eb650185b
Add progress indicator when installing an extension (#8411) 2023-12-04 19:52:11 +00:00
Andy Feller
c7c74dd422
Merge pull request #8342 from muzimuzhi/docs/unify-markup
Unify doc mark-ups
2023-12-01 09:31:36 -05:00
Andy Feller
152ab207b5 For lint sake 2023-12-01 09:20:44 -05:00
Andy Feller
a9e430e9bc Fix lint warning 2023-12-01 09:16:51 -05:00
Andy Feller
b77de0d458 Additional formatting changes
- gh help actions
  - highlight 3 commands to run for more information
- gh extension
  - wrapping url for online linking
  - fix install subcommand missing backtick formatting
- gh release create
  - fixing mixed indenting causing usage misalignment
- root help
  - backtick wrap help command for more info for consistency
- gh help environment
  - backtick wrap missed OWNER/REPO
- gh variable
  - brought consistency to output when deleting or setting variable
2023-12-01 09:08:51 -05:00