(opts *DevelopOptions, apiClient *api.Client, issueRepo ghrepo.Interface, issue *api.Issue)
| 285 | } |
| 286 | |
| 287 | func developRunList(opts *DevelopOptions, apiClient *api.Client, issueRepo ghrepo.Interface, issue *api.Issue) error { |
| 288 | opts.IO.StartProgressIndicatorWithLabel("Fetching linked branches") |
| 289 | defer opts.IO.StopProgressIndicator() |
| 290 | |
| 291 | branches, err := api.ListLinkedBranches(apiClient, issueRepo, issue.Number) |
| 292 | if err != nil { |
| 293 | return err |
| 294 | } |
| 295 | opts.IO.StopProgressIndicator() |
| 296 | |
| 297 | if len(branches) == 0 { |
| 298 | return cmdutil.NewNoResultsError(fmt.Sprintf("no linked branches found for %s#%d", ghrepo.FullName(issueRepo), issue.Number)) |
| 299 | } |
| 300 | |
| 301 | if opts.IO.IsStdoutTTY() { |
| 302 | fmt.Fprintf(opts.IO.Out, "\nShowing linked branches for %s#%d\n\n", ghrepo.FullName(issueRepo), issue.Number) |
| 303 | } |
| 304 | |
| 305 | printLinkedBranches(opts.IO, branches) |
| 306 | |
| 307 | return nil |
| 308 | } |
| 309 | |
| 310 | func printLinkedBranches(io *iostreams.IOStreams, branches []api.LinkedBranch) { |
| 311 | cs := io.ColorScheme() |
no test coverage detected