| 413 | ) |
| 414 | |
| 415 | func 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 | |
| 431 | func parseCheckStatusFromCheckRunState(state CheckRunState) checkStatus { |
| 432 | switch state { |