From a73c3b4078e9eb4fb710d792a3e8dd958a6bae30 Mon Sep 17 00:00:00 2001 From: Bruno Goncalves Date: Thu, 21 Nov 2019 10:54:23 +0100 Subject: [PATCH] always show commit_hash --- playbooks/roles/flag_ci_pr/files/flag_ci_pr.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/playbooks/roles/flag_ci_pr/files/flag_ci_pr.py b/playbooks/roles/flag_ci_pr/files/flag_ci_pr.py index 2e39099..6503c71 100644 --- a/playbooks/roles/flag_ci_pr/files/flag_ci_pr.py +++ b/playbooks/roles/flag_ci_pr/files/flag_ci_pr.py @@ -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,