Commit graph

34 commits

Author SHA1 Message Date
rajhawaldar
b8302311fa
Added wantErrOut property 2023-06-15 09:08:06 +05:30
rajhawaldar
437b78a955 Resolve tests/lint errors 2023-06-07 09:21:50 +05:30
rajhawaldar
69c02b9b8a update gh auth status to write to stdout on success 2023-06-06 23:30:16 +05:30
Sam Coe
a33e12a21d
Refactor Config interface in preperation for encrypted token storage (#7033) 2023-02-28 10:51:12 +11:00
Ariel Deitcher
a5edd8f542
show token scopes on auth status (#6546)
- show path to config file
- display token prefix
- refine how missing scopes are shown

Co-authored-by: Sam Coe <samcoe@users.noreply.github.com>
Co-authored-by: Mislav Marohnić <mislav@github.com>
2023-01-25 16:25:00 +01: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
nate smith
0a619d422a undo overzealous find/replace 2022-01-14 15:27:05 -06:00
nate smith
56522f9f14 formatting 2022-01-11 14:57:10 -06:00
nate smith
562f1b3d0d add GetOrDefault functionality to config 2022-01-11 14:56:58 -06:00
Mislav Marohnić
11fbb60ae7 Rename the module to "github.com/cli/cli/v2" 2021-08-25 12:41:30 +02:00
Mislav Marohnić
c598a1edc2 Fix detecting cases when cfg.Hosts() is empty 2021-07-20 15:50:58 +02:00
Mislav Marohnić
5a110c8e42 Add SSH key generation & uploading to gh auth login flow 2021-02-01 23:34:00 +01:00
Sam Coe
71fd2fa24c
Fix up test 2021-01-22 08:50:09 -08:00
Sam Coe
5e10638b0e
Merge branch 'trunk' into auth-status-fail 2021-01-22 08:46:24 -08:00
Mislav Marohnić
4a2cc8d2a4 Simplify ssh-key list
Do not require nor request `read:public_key` scope by default.
2021-01-20 20:23:57 +01:00
edualb
e26a1b98a1 add ssh-key command 2021-01-20 20:23:38 +01:00
Mislav Marohnić
75ebb863e3 Use testify assertions for error matching 2021-01-19 13:59:37 +01:00
Nilesh Singh
f3fcaf6c9c Fix error message text & add test case 2021-01-17 14:42:49 +05:30
Nilesh Singh
2f5ffbd60a Add fail message for non-existent hostname 2021-01-15 13:28:57 +05:30
Mislav Marohnić
c39dc28fa1 Rename auth/client to auth/shared 2020-12-07 17:08:42 +01:00
vilmibm
a2aa154794 port entirely to ColorScheme 2020-10-29 12:37:45 -07:00
Sam
edecb2e4f7
Merge pull request #2207 from cli/codespaces
[Codespaces] Support "integration" tokens
2020-10-27 15:37:02 +03:00
Mislav Marohnić
4bda6fceec auth status: fix reporting the token source 2020-10-16 17:11:14 +00:00
rista404
2bdfc10e0a
Add ability to print auth token 2020-10-11 12:55:34 +02: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
37322ec333 less spacing 2020-08-11 16:45:35 -05:00
vilmibm
6c64cb8d23 remove vestigial return from HasMinimumScopes 2020-08-11 16:33:13 -05:00
vilmibm
36b2d3f6a7 ensure that config is not written 2020-08-11 16:24:08 -05:00
vilmibm
ba2b8d50a1 minor 2020-08-11 16:20:03 -05:00
vilmibm
cd32303404 auth status formatting 2020-08-11 16:16:59 -05:00
vilmibm
3a33735da8 be more helpful 2020-08-11 15:58:00 -05:00
vilmibm
f358e600ac use SilentError 2020-08-11 15:58:00 -05:00
vilmibm
ec25b735ab gh auth status 2020-08-11 15:58:00 -05:00