whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] 02/02: Add emeritus application checks
Date Wed, 27 May 2020 11:37:46 GMT
This is an automated email from the ASF dual-hosted git repository.

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

commit 9a5396078c042edb86ebdb158b1a8d399db6cd01
Author: Sebb <sebb@apache.org>
AuthorDate: Wed May 27 12:37:33 2020 +0100

    Add emeritus application checks
---
 www/index.html                   |  1 +
 www/secretary/emeritus_check.cgi | 87 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 88 insertions(+)

diff --git a/www/index.html b/www/index.html
index 9526076..23a7875 100644
--- a/www/index.html
+++ b/www/index.html
@@ -186,6 +186,7 @@
                 <li><a href="secretary/ldap-check">LDAP members and owners checks
(may take a while to respond)</a></li>
                 <li><a href="secretary/ldap-check-committers">Detailed LDAP missing
committer check; shows subs and mods if any (may take a while to respond)</a></li>
                 <li><a href="secretary/memapp_check">Check members.txt against
members_apps</a></li>
+                <li><a href="secretary/emeritus_check">Check members.txt against
emeritus applications</a></li>
                 <li><a href="secretary/public-names">Public names: LDAP vs icla.txt</a></li>
                 <li><a href="secretary/ldap-names">LDAP name check: compare cn,
sn, givenName</a></li>
                 <li><a href="secretary/ldap-names?skipSN">LDAP name check: compare
cn, sn, givenName (only check givenName)</a></li>
diff --git a/www/secretary/emeritus_check.cgi b/www/secretary/emeritus_check.cgi
new file mode 100755
index 0000000..eb62e6c
--- /dev/null
+++ b/www/secretary/emeritus_check.cgi
@@ -0,0 +1,87 @@
+#!/usr/bin/env ruby
+
+
+### INITIAL RELEASE - SUBJECT TO CHANGE ###
+
+
+$LOAD_PATH.unshift '/srv/whimsy/lib'
+
+
+require 'whimsy/asf'
+require 'whimsy/asf/memapps'
+require 'wunderbar'
+
+exmembers = ASF::Member.emeritus.map {|id| ASF::Person.find(id)}
+files = Hash[ASF::EmeritusFiles::listnames.map{|i| [i,'NAK']}]
+nofiles = Hash.new()
+
+exmembers.each { |m|
+  ma = ASF::EmeritusFiles.find(m)
+  if ma
+    files[ma] = 'OK'
+  else
+    nofiles[m.name]=m
+  end
+}
+_html do
+  _style %{
+    table {border-collapse: collapse}
+    table, th, td {border: 1px solid black}
+    td {padding: 3px 6px}
+    tr:hover td {background-color: #FF8}
+    th {background-color: #a0ddf0}
+  }
+
+  _h1 'Compare members.txt with emeritus (**DRAFT**)'
+
+  _h2 'Files in emeritus that do not match any ASF member names'
+
+  _table_ do
+    _tr do
+      _th 'Name'
+    end
+    files.select {|k,v| v == 'NAK'}.sort_by{|k| k[0].split('-').pop}.each do |k,v|
+      _tr do
+        _td do
+          _a k, href: "https://svn.apache.org/repos/private/documents/emeritus/#{k}", target:
'_blank'
+        end
+      end
+    end
+  end
+
+_h2 'Emeritus entries in members.txt which do not appear to have a matching emeritus file'
+_table_ do
+  _tr do
+    _th 'Availid'
+    _th 'ICLA'
+    _th 'Public Name'
+    _th 'Legal Name'
+    _th 'Member.txt Name'
+  end
+  nofiles.sort_by{|k,v| v.member_name}.each do |k,v|
+    person = v
+    _tr do
+      _td do
+        _a k, href: "https://whimsy.apache.org/roster/committer/#{k}", target: '_blank'
+      end
+      _td do
+        if person.icla && person.icla.claRef
+          file = ASF::ICLAFiles.match_claRef(person.icla.claRef.untaint)
+          if file
+            _a person.icla.claRef, href: "https://svn.apache.org/repos/private/documents/iclas/#{file}",
target: '_blank'
+          else
+            _ ''
+          end
+        else
+          _ ''
+        end
+      end
+      _td (person.icla.name rescue '')
+      _td (person.icla.legal_name rescue '')
+      _td person.member_name
+    end
+  end
+end
+
+
+end


Mime
View raw message