(cs *iostreams.ColorScheme, status Status, conclusion Conclusion)
| 598 | type colorFunc func(string) string |
| 599 | |
| 600 | func Symbol(cs *iostreams.ColorScheme, status Status, conclusion Conclusion) (string, colorFunc) { |
| 601 | noColor := func(s string) string { return s } |
| 602 | if status == Completed { |
| 603 | switch conclusion { |
| 604 | case Success: |
| 605 | return cs.SuccessIconWithColor(noColor), cs.Green |
| 606 | case Skipped, Neutral: |
| 607 | return "-", cs.Muted |
| 608 | default: |
| 609 | return cs.FailureIconWithColor(noColor), cs.Red |
| 610 | } |
| 611 | } |
| 612 | |
| 613 | return "*", cs.Yellow |
| 614 | } |
| 615 | |
| 616 | func PullRequestForRun(client *api.Client, repo ghrepo.Interface, run Run) (int, error) { |
| 617 | type response struct { |
no test coverage detected