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

Function Symbol

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

Source from the content-addressed store, hash-verified

598type colorFunc func(string) string
599
600func 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
616func PullRequestForRun(client *api.Client, repo ghrepo.Interface, run Run) (int, error) {
617 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