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

Function ColorForIssueState

pkg/cmd/pr/shared/display.go:44–56  ·  view source on GitHub ↗
(issue api.Issue)

Source from the content-addressed store, hash-verified

42}
43
44func ColorForIssueState(issue api.Issue) string {
45 switch issue.State {
46 case "OPEN":
47 return "green"
48 case "CLOSED":
49 if issue.StateReason == "NOT_PLANNED" {
50 return "gray"
51 }
52 return "magenta"
53 default:
54 return ""
55 }
56}
57
58func PrintHeader(io *iostreams.IOStreams, s string) {
59 fmt.Fprintln(io.Out, io.ColorScheme().Bold(s))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected