(opts *DevelopOptions, apiClient *api.Client, issueRepo ghrepo.Interface, issue *api.Issue)
| 317 | } |
| 318 | |
| 319 | func developRunList(opts *DevelopOptions, apiClient *api.Client, issueRepo ghrepo.Interface, issue *api.Issue) error { |
| 320 | opts.IO.StartProgressIndicatorWithLabel("Fetching linked branches") |
| 321 | defer opts.IO.StopProgressIndicator() |
| 322 | |
| 323 | branches, err := api.ListLinkedBranches(apiClient, issueRepo, issue.Number) |
| 324 | if err != nil { |
| 325 | return err |
| 326 | } |
| 327 | opts.IO.StopProgressIndicator() |
| 328 | |
| 329 | if len(branches) == 0 { |
| 330 | return cmdutil.NewNoResultsError(fmt.Sprintf("no linked branches found for %s#%d", ghrepo.FullName(issueRepo), issue.Number)) |
| 331 | } |
| 332 | |
| 333 | if opts.IO.IsStdoutTTY() { |
| 334 | fmt.Fprintf(opts.IO.Out, "\nShowing linked branches for %s#%d\n\n", ghrepo.FullName(issueRepo), issue.Number) |
| 335 | } |
| 336 | |
| 337 | printLinkedBranches(opts.IO, branches) |
| 338 | |
| 339 | return nil |
| 340 | } |
| 341 | |
| 342 | func printLinkedBranches(io *iostreams.IOStreams, branches []api.LinkedBranch) { |
| 343 | cs := io.ColorScheme() |
no test coverage detected