MCPcopy Create free account
hub / github.com/cli/cli / Symbol

Function Symbol

pkg/cmd/run/shared/shared.go:603–617  ·  view source on GitHub ↗
(cs *iostreams.ColorScheme, status Status, conclusion Conclusion)

Source from the content-addressed store, hash-verified

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

Callers 6

promptForJobFunction · 0.92
watchRunFunction · 0.92
RenderRunHeaderFunction · 0.85
RenderJobsFunction · 0.85
RenderJobsCompactFunction · 0.85
SelectRunFunction · 0.85

Calls 2

SuccessIconWithColorMethod · 0.80
FailureIconWithColorMethod · 0.80

Tested by

no test coverage detected