| 8 | ) |
| 9 | |
| 10 | func RenderRunHeader(cs *iostreams.ColorScheme, run Run, ago, prNumber string, attempt uint64) string { |
| 11 | title := fmt.Sprintf("%s %s%s", |
| 12 | cs.Bold(run.HeadBranch), run.WorkflowName(), prNumber) |
| 13 | symbol, symbolColor := Symbol(cs, run.Status, run.Conclusion) |
| 14 | id := cs.Cyanf("%d", run.ID) |
| 15 | |
| 16 | attemptLabel := "" |
| 17 | if attempt > 0 { |
| 18 | attemptLabel = fmt.Sprintf(" (Attempt #%d)", attempt) |
| 19 | } |
| 20 | |
| 21 | header := "" |
| 22 | header += fmt.Sprintf("%s %s · %s%s\n", symbolColor(symbol), title, id, attemptLabel) |
| 23 | header += fmt.Sprintf("Triggered via %s %s", run.Event, ago) |
| 24 | |
| 25 | return header |
| 26 | } |
| 27 | |
| 28 | func RenderJobs(cs *iostreams.ColorScheme, jobs []Job, verbose bool) string { |
| 29 | lines := []string{} |