fix(discussion create): display spinner

Signed-off-by: Babak K. Shandiz <babakks@github.com>
This commit is contained in:
Babak K. Shandiz 2026-05-07 09:58:42 +01:00
parent 25778ce08a
commit c87d262d4b
No known key found for this signature in database
GPG key ID: 9472CAEFF56C742E

View file

@ -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)
}