fix(discussion create): display spinner
Signed-off-by: Babak K. Shandiz <babakks@github.com>
This commit is contained in:
parent
25778ce08a
commit
c87d262d4b
1 changed files with 4 additions and 0 deletions
|
|
@ -101,7 +101,9 @@ func createRun(opts *CreateOptions) error {
|
|||
return err
|
||||
}
|
||||
|
||||
opts.IO.StartProgressIndicator()
|
||||
categories, err := c.ListCategories(repo)
|
||||
opts.IO.StopProgressIndicator()
|
||||
if err != nil {
|
||||
return fmt.Errorf("fetching categories: %w", err)
|
||||
}
|
||||
|
|
@ -151,7 +153,9 @@ func createRun(opts *CreateOptions) error {
|
|||
Labels: opts.Labels,
|
||||
}
|
||||
|
||||
opts.IO.StartProgressIndicator()
|
||||
discussion, err := c.Create(repo, input)
|
||||
opts.IO.StopProgressIndicator()
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to create discussion: %w", err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue