Show progress while creating pr
This commit is contained in:
parent
b5366c6ebf
commit
a7b9e3916c
1 changed files with 6 additions and 0 deletions
|
|
@ -577,7 +577,9 @@ func submitPR(opts CreateOptions, ctx CreateContext, state shared.IssueMetadataS
|
|||
return err
|
||||
}
|
||||
|
||||
opts.IO.StartProgressIndicator()
|
||||
pr, err := api.CreatePullRequest(client, ctx.BaseRepo.(*api.Repository), params)
|
||||
opts.IO.StopProgressIndicator()
|
||||
if pr != nil {
|
||||
fmt.Fprintln(opts.IO.Out, pr.URL)
|
||||
}
|
||||
|
|
@ -613,7 +615,9 @@ func handlePush(opts CreateOptions, ctx CreateContext) error {
|
|||
// if a head repository could not be determined so far, automatically create
|
||||
// one by forking the base repository
|
||||
if headRepo == nil && ctx.IsPushEnabled {
|
||||
opts.IO.StartProgressIndicator()
|
||||
headRepo, err = api.ForkRepo(client, ctx.BaseRepo)
|
||||
opts.IO.StopProgressIndicator()
|
||||
if err != nil {
|
||||
return fmt.Errorf("error forking repo: %w", err)
|
||||
}
|
||||
|
|
@ -677,7 +681,9 @@ func handlePush(opts CreateOptions, ctx CreateContext) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
opts.IO.StartProgressIndicator()
|
||||
err := pushBranch()
|
||||
opts.IO.StopProgressIndicator()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue