cli/pkg
Tyler McGoffin 52daa9cf7d Add --token flag to gh auth login to accept a PAT as a flag
Additionally, this commit adds acceptance testing for `gh auth login` and
`gh auth logout`.

The --token flag was necessary for adding testing for `gh auth login`
because the current implementation with `--with-token` appears to be
broken. It hangs, waiting for user input, but user input doesn't exit it.

Additionally, it appears that `--with-token` is intended to allow for TTY
input of an auth token, but it isn't implemented.

`--with-token` does work when used with the redirect operator `<` when the
token is saved in a file. However, due to limitations of testscripts, I
could not use a file for saving the token in a repeatable manner. Thus,
implementing the `--token` flag seemed like a quick solution to validate
that the direction I was going during testing was valid.

Whether the flag stays or not is up for discussion, and I'd love to get
input on that from the team.
2024-10-21 16:38:10 -07:00
..
cmd Add --token flag to gh auth login to accept a PAT as a flag 2024-10-21 16:38:10 -07:00
cmdutil Fix repo fork to use remote protocol if none configured 2024-05-10 10:48:36 +02:00
extensions gh extension install not give an error if extension already installed and a clear message (#8211) 2023-10-19 15:22:21 +02:00
findsh go fmt 2021-12-02 16:12:24 +01:00
githubtemplate Add issue create --editor 2024-07-09 21:01:50 +09:00
httpmock Remove Internal from gh repo create prompt when owner is not an org (#9465) 2024-08-22 10:01:16 -07:00
iostreams Print filtered gists similar to code search 2024-10-12 23:17:56 -07:00
jsoncolor Wrap JSON arrays, objects in array with --slurp 2024-04-04 01:26:05 -07:00
jsonfieldstest Add tests for JSON field support on issue and pr view commands 2024-07-12 17:35:54 +02:00
markdown Allow user to override markdown wrap width via $GH_MDWIDTH from environment 2024-10-04 17:43:06 -07:00
option Add further docs to Option type 2024-05-10 11:05:59 +02:00
search Add json export flags to variable list command (#8516) 2024-01-17 10:09:09 -08:00
set Add GH_HOST to hosts list if it has corresponding auth token (#5087) 2022-01-29 07:37:24 +00:00
ssh Create .ssh dir if not exists 2022-06-14 12:30:04 -05:00
surveyext Unify use of tab indent in non-test source files 2024-08-03 00:35:30 +08:00