modified alerts to only post for failures

This commit is contained in:
Mike Stepanovic 2025-03-11 15:35:10 -06:00
parent f60a8979e1
commit 68f3584e66

View File

@ -122,6 +122,9 @@ def send_alert(webhook_url):
if __name__ == '__main__':
webhook_url = os.environ.get("SLACK_WEBHOOK_URL")
data = log_test_result()
# Only send an alert if there are failures
if data['fail_count'] > 0:
send_alert(webhook_url)