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
The following commit(s) were added to refs/heads/master by this push:
new 18c879e Initial draft of app checker
18c879e is described below
commit 18c879eae7d0db86f46bbc8cff126317e161b8c8
Author: Sebb <[email protected]>
AuthorDate: Tue Jun 26 17:24:14 2018 +0100
Initial draft of app checker
UI needs work (e.g. put tables side by side)
---
www/secretary/memapp_check.cgi | 87 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 87 insertions(+)
diff --git a/www/secretary/memapp_check.cgi b/www/secretary/memapp_check.cgi
new file mode 100755
index 0000000..22d408d
--- /dev/null
+++ b/www/secretary/memapp_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'
+
+status = ASF::Member.status
+
+members = ASF::Member.new.map {|id, text| ASF::Person.find(id)}
+
+files = Hash[ASF::MemApps.names.map{|i| [i,'NAK']}]
+nofiles = Hash.new()
+
+members.each { |m|
+ ma, tried = ASF::MemApps.find(m)
+ if ma.length > 0
+ ma.each {|t| files[t]='OK'}
+ else
+ nofiles[m.name]=[m,status[m.name],tried]
+ 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 member_apps (**DRAFT**)'
+
+ _h2 'Files in member_apps 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/member_apps/#{k}", target:
'_blank'
+ end
+ end
+ end
+ end
+
+_h2 'Entries in members.txt which do not appear to have a matching file'
+_table_ do
+ _tr do
+ _th 'Availid'
+ _th 'ICLA'
+ _th 'Public Name'
+ _th 'Legal Name'
+ _th 'Member.txt Name'
+ _th 'Status'
+ end
+ nofiles.sort.each do |k,v|
+ person, status, tried = 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 # TODO look up actual suffix
+ _a person.icla.claRef, href:
"https://svn.apache.org/repos/private/documents/iclas/#{person.icla.claRef}.pdf",
target: '_blank'
+ else
+ _ ''
+ end
+ end
+ _td (person.icla.name rescue '')
+ _td (person.icla.legal_name rescue '')
+ _td person.member_name
+ _td status
+ end
+ end
+end
+
+
+end