whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] 02/02: restore and expand upon comment
Date Mon, 15 May 2017 13:11:12 GMT
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

commit a384e1f5887d07e9d66e8ae66d451fcb853e10b6
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Mon May 15 09:10:58 2017 -0400

    restore and expand upon comment
---
 www/site.cgi | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/www/site.cgi b/www/site.cgi
index 0f4aef5..2c37691 100755
--- a/www/site.cgi
+++ b/www/site.cgi
@@ -53,10 +53,16 @@ def analyze(sites)
     ]
 end
 
-def label(analysis, links, c, n)
-  if not links[c]
+# Determine the color of a given table cell, given:
+#   - overall analysis of the sites, in particular the third column
+#     which is a list projects that successfully matched the check
+#   - list of links for the project in question
+#   - the column in question (which indicates the check being reported on)
+#   - the name of the project
+def label(analysis, links, col, name)
+  if not links[col]
     'label-danger'
-  elsif analysis[2].include? c and not analysis[2][c].include? n
+  elsif analysis[2].include? col and not analysis[2][col].include? name
     'label-warning'
   else
     'label-success'

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

Mime
View raw message