| 438 | ) |
| 439 | |
| 440 | func 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 | |
| 456 | func parseCheckStatusFromCheckRunState(state CheckRunState) checkStatus { |
| 457 | switch state { |