(github-badge) fix action status for unmatched context. fix #305

pull/312/head
amio 2019-08-21 22:31:10 +08:00
rodzic c5867b91f7
commit bd4483cb83
1 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -107,10 +107,12 @@ const statesColor = {
pending: 'orange',
success: 'green',
failure: 'red',
error: 'red'
error: 'red',
unknown: 'grey'
}
function combineState (states) {
function combineState (states: Array<any>) {
if (states.length === 0) return 'unknown'
if (states.find(x => x.state === 'error')) return 'error'
if (states.find(x => x.state === 'failure')) return 'failure'
if (states.find(x => x.state === 'pending')) return 'pending'