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

Function parseCheckStatusFromStatusState

api/queries_pr.go:440–454  ·  view source on GitHub ↗
(state StatusState)

Source from the content-addressed store, hash-verified

438)
439
440func parseCheckStatusFromStatusState(state StatusState) checkStatus {
441 switch state {
442 case StatusStateSuccess:
443 return passing
444 case StatusStateFailure, StatusStateError:
445 return failing
446 case StatusStateExpected, StatusStatePending:
447 return pending
448 // Currently, we treat anything unknown as pending, which includes any future unknown
449 // states we might get back from the API. It might be interesting to do some work to add an additional
450 // unknown state.
451 default:
452 return pending
453 }
454}
455
456func parseCheckStatusFromCheckRunState(state CheckRunState) checkStatus {
457 switch state {

Callers 1

ChecksStatusMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected