whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] 01/02: allow the number of ICLAs to be scanned to vary
Date Thu, 04 Aug 2016 17:25:18 GMT
This is an automated email from the ASF dual-hosted git repository.

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

commit 95aa14fc54216112cd38e4b10cce88accd3211c9
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Thu Aug 4 13:24:32 2016 -0400

    allow the number of ICLAs to be scanned to vary
---
 www/officers/acreq.cgi | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/www/officers/acreq.cgi b/www/officers/acreq.cgi
index a6611e6..9b9e02a 100755
--- a/www/officers/acreq.cgi
+++ b/www/officers/acreq.cgi
@@ -57,13 +57,18 @@ podlings = ASF::Podling.list.select {|podling| podling.status == 'current'}.
   map(&:name).sort
 
 # grab the list of iclas that have no ids assigned
-query_string = CGI::parse ENV['QUERY_STRING']
-if query_string.has_key? 'fulllist'
+query = CGI::parse ENV['QUERY_STRING']
+iclas = Array(query['iclas']).last
+email = Array(query['email']).last
+if iclas == 'all'
   iclas = Hash[*officers.scan(/^notinavail:.*?:(.*?):(.*?):Signed CLA/).
     flatten.reverse]
+elsif iclas == '1' and email and officers =~ /^notinavail:.*?:(.*?):#{email}:/
+  iclas = {email => $1}
 else
+  count = iclas ? iclas.to_i : 300 rescue 300
   oldrev = \
-    `#{SVN} log --incremental -q -r HEAD:0 -l300 -- #{OFFICERS}/iclas.txt`.
+    `#{SVN} log --incremental -q -r HEAD:0 -l#{count} -- #{OFFICERS}/iclas.txt`.
     split("\n")[-1].split()[0][1..-1].to_i
   iclas = Hash[*`#{SVN} diff -r #{oldrev}:HEAD -- #{OFFICERS}/iclas.txt`.
     scan(/^[+]notinavail:.*?:(.*?):(.*?):Signed CLA/).flatten.reverse]
@@ -349,13 +354,13 @@ _html do
 
     unless _.post?
       _p do
-        if @fulllist
+        if @iclas == 'all'
           _span 'This page shows all ICLAs ever received.  Click here to'
           _a 'show only ICLAs received recently', href: '?'
           _span '.'
         else
           _span 'This page shows only ICLAs received recently.  Click here to'
-          _a 'choose from the full list of ICLA submitters', href: '?fulllist=1'
+          _a 'choose from the full list of ICLA submitters', href: '?iclas=all'
           _span '.'
         end
       end

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

Mime
View raw message