You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2017/09/25 23:48:41 UTC

[whimsy] branch master updated: treat identified site errors as a warning

This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 3cffa12  treat identified site errors as a warning
3cffa12 is described below

commit 3cffa1207cd9ee9ef653bf73c0f1c256991a4fe8
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Mon Sep 25 19:48:15 2017 -0400

    treat identified site errors as a warning
---
 www/status/monitors/site_scan.rb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/www/status/monitors/site_scan.rb b/www/status/monitors/site_scan.rb
index 470fee2..167fc77 100644
--- a/www/status/monitors/site_scan.rb
+++ b/www/status/monitors/site_scan.rb
@@ -30,8 +30,10 @@ def Monitor.site_scan(previous_status)
     FileUtils.mkdir(archive) unless File.directory?(archive)
     file = File.basename(logfile)
     FileUtils.copy logfile, File.join(archive, file + '.danger'), preserve: true
+    level = 'danger'
+    level = 'warning' if log.gsub(/.* error\n/, '').empty?
     {
-      level: 'danger',
+      level: level,
       data: log.split("\n"),
       href: '../logs/site-scan'
     }

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <co...@whimsical.apache.org>'].