refactor(pr edit): move httpclient initialization
This commit is contained in:
parent
54f48cfe46
commit
f6bb1ca756
1 changed files with 5 additions and 9 deletions
|
|
@ -201,12 +201,12 @@ func editRun(opts *EditOptions) error {
|
|||
Detector: opts.Detector,
|
||||
}
|
||||
|
||||
if opts.Detector == nil {
|
||||
httpClient, err := opts.HttpClient()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
httpClient, err := opts.HttpClient()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if opts.Detector == nil {
|
||||
baseRepo, err := opts.BaseRepo()
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
@ -262,10 +262,6 @@ func editRun(opts *EditOptions) error {
|
|||
}
|
||||
}
|
||||
|
||||
httpClient, err := opts.HttpClient()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
apiClient := api.NewClientFromHTTP(httpClient)
|
||||
|
||||
opts.IO.StartProgressIndicator()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue