MCPcopy
hub / github.com/harness/harness / ConvertToCheckStatus

Method ConvertToCheckStatus

types/enum/ci_status.go:54–68  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52}
53
54func (status CIStatus) ConvertToCheckStatus() CheckStatus {
55 if status == CIStatusPending || status == CIStatusWaitingOnDeps {
56 return CheckStatusPending
57 }
58 if status == CIStatusSuccess || status == CIStatusSkipped {
59 return CheckStatusSuccess
60 }
61 if status == CIStatusFailure {
62 return CheckStatusFailure
63 }
64 if status == CIStatusRunning {
65 return CheckStatusRunning
66 }
67 return CheckStatusError
68}
69
70// ParseCIStatus converts the status from a string to typed enum.
71// If the match is not exact, will just return default error status

Callers 1

WriteFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected