Better cope with the different state returned by the CI pipeline
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
parent
1447416794
commit
7e999006bb
1 changed files with 5 additions and 5 deletions
|
@ -38,9 +38,9 @@ def main(msg):
|
||||||
'https://', requests.adapters.HTTPAdapter(max_retries=retry_conf))
|
'https://', requests.adapters.HTTPAdapter(max_retries=retry_conf))
|
||||||
|
|
||||||
done_states = {
|
done_states = {
|
||||||
'SUCCESS': 'success',
|
'SUCCESS': {'api': 'success', 'human': 'passed'},
|
||||||
'UNSTABLE': 'failed',
|
'UNSTABLE': {'api': 'failure', 'human': 'failed'},
|
||||||
'FAILURE': 'error',
|
'FAILURE': {'api': 'error', 'human': 'errored'},
|
||||||
}
|
}
|
||||||
state = msg['status']
|
state = msg['status']
|
||||||
if state not in done_states:
|
if state not in done_states:
|
||||||
|
@ -57,8 +57,8 @@ def main(msg):
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
'username': 'All packages PR',
|
'username': 'All packages PR',
|
||||||
'status': done_states[state],
|
'status': done_states[state]['api'],
|
||||||
'comment': 'Package tests: %s' % (done_states[state]),
|
'comment': 'Package tests: %s' % (done_states[state]['human']),
|
||||||
'url': msg['build_url'],
|
'url': msg['build_url'],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue