cli/pkg/cmd
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
..
actions Additional formatting changes 2023-12-01 09:08:51 -05:00
alias Move config interfaces into gh package (#9060) 2024-05-10 10:39:36 +02:00
api Update documentation for gh api PATCH 2024-07-22 19:36:20 +01:00
attestation Merge branch 'trunk' into phillmv/fail-verification-if-no-attestations 2024-10-21 12:49:41 -04:00
auth Add --token flag to gh auth login to accept a PAT as a flag 2024-10-21 16:38:10 -07:00
browse Update pkg/cmd/browse/browse.go 2024-01-05 10:53:15 -04:00
cache Fix typos 2024-05-09 20:15:27 +00:00
codespace Unify use of tab indent in non-test source files 2024-08-03 00:35:30 +08:00
completion Bump github.com/spf13/cobra from v1.4.0 to v1.5.0 (#6196) 2022-09-06 09:43:40 +04:00
config Add prefer_editor_prompt config 2024-07-09 21:01:50 +09:00
extension Check extOwner for no value instead 2024-10-21 13:28:37 -06:00
factory Fix repo fork to use remote protocol if none configured 2024-05-10 10:48:36 +02:00
gist Merge pull request #9728 from heaths/issue9704 2024-10-15 16:26:13 -07:00
gpg-key Move config interfaces into gh package (#9060) 2024-05-10 10:39:36 +02:00
issue Fix failing test for pr and issue create 2024-10-08 16:11:05 -07:00
label Fix tests 2024-08-16 10:11:52 -07:00
org Move config interfaces into gh package (#9060) 2024-05-10 10:39:36 +02:00
pr Remove . from test case for TestTitleSurvey 2024-10-17 14:45:35 -07:00
project Move config interfaces into gh package (#9060) 2024-05-10 10:39:36 +02:00
release Improve the help message for -F (#9525) 2024-08-28 11:00:46 -07:00
repo Use go-gh/auth package for IsEnterprise, IsTenancy, and NormalizeHostname 2024-10-15 11:56:43 -07:00
root Allow user to override markdown wrap width via $GH_MDWIDTH from environment 2024-10-04 17:43:06 -07:00
ruleset Use go-gh/auth package for IsEnterprise, IsTenancy, and NormalizeHostname 2024-10-15 11:56:43 -07:00
run Include startedAt, completedAt in run steps data 2024-10-16 19:38:10 -04:00
search Resolve PR feedback 2024-10-14 15:08:23 -07:00
secret Fix host handling in variable and secret delete 2024-08-02 15:11:22 -04:00
ssh-key Move config interfaces into gh package (#9060) 2024-05-10 10:39:36 +02:00
status Move config interfaces into gh package (#9060) 2024-05-10 10:39:36 +02:00
variable Merge branch 'trunk' into tab-indents 2024-08-06 13:08:48 -04:00
version Fix --version flag printing to stdout 2022-05-24 16:21:13 +02:00
workflow Fix tests 2024-08-16 10:11:52 -07:00