MCPcopy Index your code
hub / github.com/cli/cli / parseCheckStatusFromStatusState

Function parseCheckStatusFromStatusState

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

Source from the content-addressed store, hash-verified

413)
414
415func parseCheckStatusFromStatusState(state StatusState) checkStatus {
416 switch state {
417 case StatusStateSuccess:
418 return passing
419 case StatusStateFailure, StatusStateError:
420 return failing
421 case StatusStateExpected, StatusStatePending:
422 return pending
423 // Currently, we treat anything unknown as pending, which includes any future unknown
424 // states we might get back from the API. It might be interesting to do some work to add an additional
425 // unknown state.
426 default:
427 return pending
428 }
429}
430
431func parseCheckStatusFromCheckRunState(state CheckRunState) checkStatus {
432 switch state {

Callers 1

ChecksStatusMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected