Commit graph

19 commits

Author SHA1 Message Date
William Martin
a9dbda6913 Rework ref usage when finding and creating PRs 2025-04-15 13:38:10 -06:00
William Martin
75712de712 Allow client pull to use insecure credential pattern 2024-11-26 22:29:51 +01:00
William Martin
46922694dc Support secure credential pattern 2024-11-26 22:29:38 +01:00
Mislav Marohnić
8df1e9946f
repo set-default: support bare git repos
The command was using this to check for git repo context:

    git rev-parse --is-inside-work-tree

With this change, this is used instead:

    git rev-parse --git-dir

The latter approach works in the context of a bare git repository, which does not have a worktree.
2023-01-18 20:45:12 +01:00
Sam Coe
98ab1f2587
Authenticate network git commands (#6541) 2022-11-15 13:14:37 +02:00
Sam Coe
f96b2fce57
Refactor git client and add tests (#6525) 2022-11-03 11:58:38 +01: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
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ć
d86cfe4627 Unpublish SetPrepareCmd 2021-01-28 21:59:30 +01:00
Mislav Marohnić
c308f1cd91 Prevent further use of SetPrepareCmd and InitCmdStubber 2021-01-18 22:44:53 +01:00
Josh Soref
a66a65d422 spelling: unmatched 2020-11-21 21:43:51 -05:00
Mislav Marohnić
6e1e62f496 Consistently print commands in DEBUG mode 2020-11-11 18:17:01 +01:00
Mislav Marohnić
97b176da93 Fix git executable name for Windows in tests 2020-11-11 16:46:49 +01:00
Mislav Marohnić
c87dc00f38 Omit the full path of a command in DEBUG mode 2020-11-11 16:33:13 +01:00
Mislav Marohnić
5b4a08dcb9 Ensure that only PATH is searched when shelling out to external commands
Works around https://github.com/golang/go/issues/38736 for Windows.
2020-11-11 16:33:13 +01:00
Mislav Marohnić
f9783fe812 Add exec.Command stub mechanism that matches by arguments
Our previous command stub mechanism matches stubs sequentially, which leads to brittle tests when the exec calls get reordered or removed in the implementation.
2020-09-23 18:38:29 +02:00
vilmibm
5187ad4431 move preparecmd and Runnable to its own package 2020-03-23 16:32:29 -05:00