petercover
bad7098cfe
chore: fix some comments
...
Signed-off-by: petercover <raowanxiang@outlook.com>
2025-01-23 00:47:27 +08:00
William Martin
4da4c82090
Rename secret BaseRepo func
2025-01-15 14:55:17 +01:00
William Martin
b9c597458b
Document SmartBaseRepoFunc
2024-12-23 19:07:17 +01:00
William Martin
7a954cde82
Document BaseRepoFunc
2024-12-23 19:07:17 +01:00
William Martin
07e0ff7127
Fix repo fork to use remote protocol if none configured
2024-05-10 10:48:36 +02:00
William Martin
1d38230675
Move config interfaces into gh package ( #9060 )
2024-05-10 10:39:36 +02: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
7924878315
Fix git protocol and refactor Config interface ( #8246 )
2023-10-27 15:42:05 +02:00
Jun Nishimura
508065b72d
Add verbose flag to api cmd ( #7826 )
2023-08-25 09:37:37 -07:00
Sam Coe
dbc2f05124
Update go-gh to v2 ( #7299 )
...
* Update go-gh
* Update code for go-gh v2
2023-04-16 15:34:23 +10:00
Benjamin Levesque
9596fd5368
Skip checking keyring for token in certain scenarios ( #7169 )
2023-03-18 08:59:43 +11:00
Sam Coe
c9a2d85793
Cleanup config.AuthToken and config.DefaultHost methods ( #7049 )
2023-02-28 00:24:45 +00:00
Sam Coe
a33e12a21d
Refactor Config interface in preperation for encrypted token storage ( #7033 )
2023-02-28 10:51:12 +11:00
vilmibm
290d90430d
select base repo correctly when only one remote
2023-01-03 11:58:48 -08:00
vilmibm
f5d19b831e
error instead of prompt when no base repo + fixes
2022-12-15 11:44:37 -08:00
Sam Coe
6bbfc5056d
Use git client in extension manager ( #6547 )
2022-11-10 11:38:12 +02:00
Sam Coe
4294ee14a1
revert revert 57fbe4f317 ( #6474 )
2022-10-20 12:17:20 +00:00
Sam Coe
2cefb9fa59
Fix pr create regression ( #6472 )
...
* Revert "Refactor to use new git client (#6447 )"
This reverts commit 57fbe4f317 .
* Fix pr create regression
2022-10-20 12:46:23 +03:00
Sam Coe
57fbe4f317
Refactor to use new git client ( #6447 )
2022-10-19 21:11:36 +03:00
Sam Coe
2944f7c3ab
Create git client ( #6354 )
2022-10-14 07:47:03 +00:00
Eng Zer Jun
471cbea4fa
test: use t.Setenv to set env vars in tests ( #6333 )
...
This commit replaces `os.Setenv` with `t.Setenv` in tests. The
environment variable is automatically restored to its original value
when the test and all its subtests complete.
Reference: https://pkg.go.dev/testing#T.Setenv
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-09-26 08:46:02 +00:00
vilmibm
7b21a3ea45
use Prompter in context
2022-09-21 11:33:28 -07:00
Sam Coe
4bd5c2db9d
Rely on go-gh browser resolution ( #6237 )
2022-09-12 13:23:36 +04:00
Sam Coe
6a8deb1f5a
Integrate latest go-gh packages ( #6084 )
2022-08-18 09:04:13 +03:00
Ariel Deitcher
43325fb3e1
Disable interactive prompting with GH_PROMPT_DISABLED ( #6082 )
2022-08-17 09:11:54 +03:00
vilmibm
8bba7f9624
rename NewPrompter to New
2022-08-15 13:28:15 -05:00
vilmibm
791b8b4173
Merge remote-tracking branch 'origin/trunk' into prompt-factory
2022-08-15 13:21:22 -05:00
Mislav Marohnić
d21d388b8d
Restore old GH_DEBUG=1 behavior for HTTP logging ( #6054 )
...
- No HTTP bodies or headers are logged until `GH_DEBUG=api` is used.
- Logging to terminal now supports colorization.
2022-08-10 17:59:13 +02:00
vilmibm
f7d5c5f725
move prompter to own package
2022-07-26 16:41:13 -05:00
vilmibm
4afb567d06
WIP: survey wrapper
2022-07-26 14:39:38 -05:00
casswedson
00bc550dc6
chore: typo hunting ft. codespell
2022-07-09 21:41:09 -05:00
Sam Coe
cacff4ad6d
Use go-gh config package ( #5771 )
2022-06-23 11:50:04 +00:00
Sam Coe
074ed50b8a
Integrate go-gh API package ( #5614 )
2022-06-23 04:05:31 +01:00
Sam Coe
743a747804
Use go-gh for SSH hostname alias translation ( #5654 )
2022-06-08 21:32:29 +00:00
Håvard Anda Estensen
58cb773e09
Replace ioutil with io and os ( #5498 )
2022-04-26 13:07:44 +02:00
lylecantcode
56fda0f8c6
Support GH_DEBUG to control verbosity, deprecate DEBUG ( #5306 )
...
The GH_DEBUG environment variable is a new gh-specific verbosity control.
For backwards-compatibility, DEBUG will still be respected if it has values
"1", "true", "yes", and "api", but any other values will be ignored.
Finally, support for "oauth" debug value has been dropped in favor of "api".
The "oauth" value only had limited, internal use.
Co-authored-by: Mislav Marohnić <mislav@github.com>
2022-03-29 18:05:35 +02:00
Mislav Marohnić
66c18b40f2
Handle SAML enforcement challenge from the server ( #5054 )
...
Whenever a SSO challenge gets issued by the server by means of a URL in
the `X-GitHub-SSO` response header, gh now additionally prints that URL
on the standard error stream.
This is achieved by installing a middleware to all HTTP requests and
storing the server challenge to a value accessible by `factory.SSOURL()`.
Such approach was made necessary mainly because of the
`shurcool-graphql` client which doesn't give access to response headers
when a GraphQL error case is encountered.
2022-01-19 14:22:22 +01:00
Nate Smith
4b415f80d7
Merge pull request #5022 from cli/config-defaults
...
add GetOrDefault and related methods to Config
2022-01-17 10:44:28 -06: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ć
3cce16e72d
Refactor factory.Executable() to be a method rather than a func
...
This way, factory can satisfy an interface that requires `Executable()`.
2021-12-21 13:50:55 +01:00
Mislav Marohnić
d853ce5bc9
Avoid resolving executable() until requested at runtime
...
This is to avoid hitting the filesystem and resolving symlinks
unnecessarily. The value of executable is just used conditionally by a
handful of commands.
2021-09-24 14:42:41 +02:00
Mislav Marohnić
78b35b7b6e
Merge remote-tracking branch 'origin' into 3704-credential-helper
2021-09-24 14:35:01 +02:00
vilmibm
7bf85355a9
restore cached client
2021-09-22 15:59:57 -05:00
vilmibm
514d4d992c
refactor dependencies of ext manager
2021-09-21 15:55:31 -05:00
Mislav Marohnić
d731cb9c73
Fix determining current process location
2021-09-06 16:57:59 +02:00
Mislav Marohnić
55c3064f45
Merge remote-tracking branch 'origin' into 3704-credential-helper
2021-09-06 16:16:52 +02:00
wilso199
2dba58bfa8
Using gh executable from PATH in favor of the resolved path
2021-08-30 16:57:43 -04:00
Mislav Marohnić
11fbb60ae7
Rename the module to "github.com/cli/cli/v2"
2021-08-25 12:41:30 +02:00