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))
|
||||
|
||||
done_states = {
|
||||
'SUCCESS': 'success',
|
||||
'UNSTABLE': 'failed',
|
||||
'FAILURE': 'error',
|
||||
'SUCCESS': {'api': 'success', 'human': 'passed'},
|
||||
'UNSTABLE': {'api': 'failure', 'human': 'failed'},
|
||||
'FAILURE': {'api': 'error', 'human': 'errored'},
|
||||
}
|
||||
state = msg['status']
|
||||
if state not in done_states:
|
||||
|
@ -57,8 +57,8 @@ def main(msg):
|
|||
|
||||
data = {
|
||||
'username': 'All packages PR',
|
||||
'status': done_states[state],
|
||||
'comment': 'Package tests: %s' % (done_states[state]),
|
||||
'status': done_states[state]['api'],
|
||||
'comment': 'Package tests: %s' % (done_states[state]['human']),
|
||||
'url': msg['build_url'],
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue