Fix pr create regression (#6472)
* Revert "Refactor to use new git client (#6447)"
This reverts commit 57fbe4f317.
* Fix pr create regression
This commit is contained in:
parent
57fbe4f317
commit
2cefb9fa59
44 changed files with 446 additions and 483 deletions
|
|
@ -8,7 +8,6 @@ import (
|
|||
|
||||
"github.com/MakeNowJust/heredoc"
|
||||
"github.com/cli/cli/v2/api"
|
||||
"github.com/cli/cli/v2/git"
|
||||
"github.com/cli/cli/v2/internal/authflow"
|
||||
"github.com/cli/cli/v2/internal/ghinstance"
|
||||
"github.com/cli/cli/v2/pkg/cmd/ssh-key/add"
|
||||
|
|
@ -28,7 +27,6 @@ type LoginOptions struct {
|
|||
IO *iostreams.IOStreams
|
||||
Config iconfig
|
||||
HTTPClient *http.Client
|
||||
GitClient *git.Client
|
||||
Hostname string
|
||||
Interactive bool
|
||||
Web bool
|
||||
|
|
@ -65,11 +63,7 @@ func Login(opts *LoginOptions) error {
|
|||
|
||||
var additionalScopes []string
|
||||
|
||||
credentialFlow := &GitCredentialFlow{
|
||||
Executable: opts.Executable,
|
||||
Prompter: opts.Prompter,
|
||||
GitClient: opts.GitClient,
|
||||
}
|
||||
credentialFlow := &GitCredentialFlow{Executable: opts.Executable, Prompter: opts.Prompter}
|
||||
if opts.Interactive && gitProtocol == "https" {
|
||||
if err := credentialFlow.Prompt(hostname); err != nil {
|
||||
return err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue