MCPcopy Index your code
hub / github.com/monitoror/monitoror / parseStatus

Function parseStatus

monitorables/github/api/usecase/github.go:278–292  ·  view source on GitHub ↗
(status *models.Status)

Source from the content-addressed store, hash-verified

276}
277
278func parseStatus(status *models.Status) coreModels.TileStatus {
279 // Based on : https://developer.github.com/v3/repos/statuses/
280 switch status.State {
281 case "success":
282 return coreModels.SuccessStatus
283 case "failure":
284 return coreModels.FailedStatus
285 case "error":
286 return coreModels.FailedStatus
287 case "pending":
288 return coreModels.RunningStatus
289 }
290
291 return coreModels.UnknownStatus
292}

Callers 1

convertChecksFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected