X Tutup
Skip to content

Commit a7b9e39

Browse files
Show progress while creating pr
1 parent b5366c6 commit a7b9e39

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/cmd/pr/create/create.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,9 @@ func submitPR(opts CreateOptions, ctx CreateContext, state shared.IssueMetadataS
577577
return err
578578
}
579579

580+
opts.IO.StartProgressIndicator()
580581
pr, err := api.CreatePullRequest(client, ctx.BaseRepo.(*api.Repository), params)
582+
opts.IO.StopProgressIndicator()
581583
if pr != nil {
582584
fmt.Fprintln(opts.IO.Out, pr.URL)
583585
}
@@ -613,7 +615,9 @@ func handlePush(opts CreateOptions, ctx CreateContext) error {
613615
// if a head repository could not be determined so far, automatically create
614616
// one by forking the base repository
615617
if headRepo == nil && ctx.IsPushEnabled {
618+
opts.IO.StartProgressIndicator()
616619
headRepo, err = api.ForkRepo(client, ctx.BaseRepo)
620+
opts.IO.StopProgressIndicator()
617621
if err != nil {
618622
return fmt.Errorf("error forking repo: %w", err)
619623
}
@@ -677,7 +681,9 @@ func handlePush(opts CreateOptions, ctx CreateContext) error {
677681
return nil
678682
}
679683

684+
opts.IO.StartProgressIndicator()
680685
err := pushBranch()
686+
opts.IO.StopProgressIndicator()
681687
if err != nil {
682688
return err
683689
}

0 commit comments

Comments
 (0)
X Tutup