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 5c9ce1b2 Use library routine for parsing
5c9ce1b2 is described below

commit 5c9ce1b20d3b1cb88a839cebed2a3dbdf5c1e30a
Author: Sebb <[email protected]>
AuthorDate: Sun Jun 1 22:10:45 2025 +0100

    Use library routine for parsing
---
 www/secretary/icla-lint.cgi | 24 +++++++++---------------
 1 file changed, 9 insertions(+), 15 deletions(-)

diff --git a/www/secretary/icla-lint.cgi b/www/secretary/icla-lint.cgi
index 3392653e..646fc691 100755
--- a/www/secretary/icla-lint.cgi
+++ b/www/secretary/icla-lint.cgi
@@ -97,20 +97,15 @@ _html do
       _th 'ICLA stub'
     end
 
-    input = File.join(ASF::SVN['officers'], 'iclas.txt')
-    document = File.read(input)
-    document.scan(/^((\w.*?):.*?:(.*?):(.*?):(.*))/) do |(line, id, name, 
email, comment)|
-      issue, note = nil, nil
-      comment2 = comment.dup
-      claRef = nil
-
-      if comment.sub!(/\s*(\(.*?\))\s*/, '')
-        issue, note = 'comment', "parenthetical comment: #{$1.inspect}"
-      end
+    ASF::ICLA.each do |icla_entry|
+      line = icla_entry.as_line
+      id = icla_entry.id
+      name = icla_entry.name
+      email = icla_entry.email
+      comment = icla_entry.form
+      claRef = icla_entry.claRef
 
-      if comment.sub!(/Signed CLA(.+?);/, 'Signed CLA;')
-        issue, note = 'extra', "extra text: #{$1.inspect}"
-      end
+      issue, note = nil, nil
 
       if id != 'notinavail'
         icla_ids[id] << line
@@ -122,7 +117,6 @@ _html do
         issue, note = 'notinldap', 'not in LDAP people'
       end
       if comment =~ /Signed CLA;(.*)/
-        claRef = $1
         # to be valid, the entry must exist; also record what we have seen
         missing = claRef.split(',').reject {|path| seen[path] << 
[id,name,email]; iclafiles.include? path}
 
@@ -173,7 +167,7 @@ _html do
           end
 
           _td email
-          _td comment2
+          _td comment
         end
       end
     end

Reply via email to