You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2019/07/25 22:11:35 UTC

[whimsy] branch master updated: Ensure duplicate refs are not reported as missing

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 d57fd76  Ensure duplicate refs are not reported as missing
d57fd76 is described below

commit d57fd769bb564bfdbf1ab41c1cd2592a0822356c
Author: Sebb <se...@apache.org>
AuthorDate: Thu Jul 25 23:11:31 2019 +0100

    Ensure duplicate refs are not reported as missing
---
 www/secretary/icla-lint.cgi | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/www/secretary/icla-lint.cgi b/www/secretary/icla-lint.cgi
index 124d7c5..1c02249 100755
--- a/www/secretary/icla-lint.cgi
+++ b/www/secretary/icla-lint.cgi
@@ -142,8 +142,8 @@ _html do
       end
       if comment =~ /Signed CLA;(.*)/
         claRef = $1
-        # to be valid, the entry must exist; remove matched entries
-        missing = claRef.split(',').select {|path| seen[path] += 1; iclas.delete(path) == nil}
+        # to be valid, the entry must exist; also record what we have seen
+        missing = claRef.split(',').reject {|path| seen[path] += 1; iclas.include? path}
 
         if not missing.empty?
           issue, note = 'error', "missing icla: #{missing.first.inspect}"
@@ -220,6 +220,9 @@ _html do
     _ 'All committers have ICLAs'
   end
 
+  # drop any stems we have seen
+  iclas.reject! {|path| seen.include? path}
+
   # select entries with count != 1  
   seen.select! {|k,v| v != 1}
   if seen.size > 0