always show commit_hash

This commit is contained in:
Bruno Goncalves 2019-11-21 10:54:23 +01:00
parent 4120c9c71d
commit a73c3b4078

View file

@ -48,7 +48,6 @@ def main(msg, pipeline_state='complete', seed='empty'):
print('Unsupported msg version, ignoring')
return
commit_hash_text = ''
# test complete messages
if pipeline_state == 'complete':
done_states = {
@ -64,9 +63,6 @@ def main(msg, pipeline_state='complete', seed='empty'):
status = done_states[state]['api']
human_status = done_states[state]['human']
if 'commit_hash' in msg['artifact']:
commit_hash_text = ' for %s' % msg['artifact']['commit_hash'][:8]
# test running messages
elif pipeline_state == 'running':
status = 'pending'
@ -84,6 +80,8 @@ def main(msg, pipeline_state='complete', seed='empty'):
return
pr_id = str(msg['artifact']['id'])
commit_hash_text = ' for %s' % msg['artifact']['commit_hash'][:8]
data = {
'username': 'Fedora CI',
'status': status,