Add commit hash to comment
This allows pagure to display the git hash for CI results Signed-off-by: Karsten Hopp <karsten@redhat.com>
This commit is contained in:
parent
95afa9610e
commit
78e11431db
1 changed files with 5 additions and 1 deletions
|
@ -58,6 +58,10 @@ def main(msg, pipeline_state='complete', seed='empty'):
|
||||||
|
|
||||||
status = done_states[state]['api']
|
status = done_states[state]['api']
|
||||||
human_status = done_states[state]['human']
|
human_status = done_states[state]['human']
|
||||||
|
if 'commit_hash' in msg:
|
||||||
|
commit_hash_text = ' for %s' % msg['commit_hash'][:8]
|
||||||
|
else:
|
||||||
|
commit_hash_text = ''
|
||||||
|
|
||||||
# test running messages
|
# test running messages
|
||||||
elif pipeline_state == 'running':
|
elif pipeline_state == 'running':
|
||||||
|
@ -74,7 +78,7 @@ def main(msg, pipeline_state='complete', seed='empty'):
|
||||||
data = {
|
data = {
|
||||||
'username': 'Fedora CI',
|
'username': 'Fedora CI',
|
||||||
'status': status,
|
'status': status,
|
||||||
'comment': 'Package tests: %s' % human_status,
|
'comment': 'Package tests%s: %s' % (commit_hash_text,human_status),
|
||||||
'url': msg['build_url'],
|
'url': msg['build_url'],
|
||||||
'uid': hashlib.md5(pr_id + seed).hexdigest()
|
'uid': hashlib.md5(pr_id + seed).hexdigest()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue