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,