MCPcopy
hub / github.com/cli/cli / PrStateWithDraft

Function PrStateWithDraft

pkg/cmd/pr/shared/display.go:20–26  ·  view source on GitHub ↗
(pr *api.PullRequest)

Source from the content-addressed store, hash-verified

18}
19
20func PrStateWithDraft(pr *api.PullRequest) string {
21 if pr.IsDraft && pr.State == "OPEN" {
22 return "DRAFT"
23 }
24
25 return pr.State
26}
27
28func ColorForPRState(pr api.PullRequest) string {
29 switch pr.State {

Callers 2

ResolveMethod · 0.92
listRunFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected