Skip to content
This repository has been archived by the owner on Jul 24, 2018. It is now read-only.

Only consider taskotron messages in the special taskotron rules. #70

Merged
merged 1 commit into from Feb 18, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 16 additions & 0 deletions fmn/rules/taskotron.py
Expand Up @@ -22,6 +22,10 @@ def taskotron_task(config, message, task=None):
i.e.: ``depcheck,rpmlint``.
"""

# We only operate on taskotron messages, first off.
if not taskotron_result_new(config, message):
return False

if not task:
return False

Expand All @@ -40,6 +44,10 @@ def taskotron_changed_outcome(config, message):
FAILED -> PASSED).
"""

# We only operate on taskotron messages, first off.
if not taskotron_result_new(config, message):
return False

outcome = message['msg']['result'].get('outcome')
prev_outcome = message['msg']['result'].get('prev_outcome')

Expand All @@ -61,6 +69,10 @@ def taskotron_task_outcome(config, message, outcome=None):
libtaskotron/latest/resultyaml.html#minimal-version>`_.
"""

# We only operate on taskotron messages, first off.
if not taskotron_result_new(config, message):
return False

if not outcome:
return False

Expand Down Expand Up @@ -106,6 +118,10 @@ def taskotron_release_critical_task(config, message):
``upgradepath``.
"""

# We only operate on taskotron messages, first off.
if not taskotron_result_new(config, message):
return False

task = message['msg']['task'].get('name')

return task in ['depcheck', 'upgradepath']