whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: Merge extra cols from commiters check
Date Sun, 23 May 2021 14:12:36 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


The following commit(s) were added to refs/heads/master by this push:
     new 879a58d  Merge extra cols from commiters check
879a58d is described below

commit 879a58d4c41caeea625a75ce39d72f4566ff8420
Author: Sebb <sebb@apache.org>
AuthorDate: Sun May 23 15:12:28 2021 +0100

    Merge extra cols from commiters check
    
    ldap-check-committers mainly duplicated the work in ldap-check
    so merge the two
---
 www/index.html                          |  1 -
 www/secretary/ldap-check-committers.cgi | 78 ---------------------------------
 www/secretary/ldap-check.cgi            | 13 +++++-
 3 files changed, 12 insertions(+), 80 deletions(-)

diff --git a/www/index.html b/www/index.html
index c6b37e4..5a6b8ab 100644
--- a/www/index.html
+++ b/www/index.html
@@ -184,7 +184,6 @@
                 <li><a href="secretary/workbench/">Secretary Workbench</a></li>
                 <li><a href="secretary/icla-lint">Lint test for iclas.txt</a></li>
                 <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>
diff --git a/www/secretary/ldap-check-committers.cgi b/www/secretary/ldap-check-committers.cgi
deleted file mode 100755
index 19ed332..0000000
--- a/www/secretary/ldap-check-committers.cgi
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/usr/bin/env ruby
-
-=begin
-
-LDAP people should be committers (unless login is disabled)
-
-=end
-
-$LOAD_PATH.unshift '/srv/whimsy/lib'
-
-require 'whimsy/asf'
-require 'whimsy/asf/mlist'
-require 'wunderbar'
-
-_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 'LDAP membership checks'
-
-  old = ASF::Group['committers'].memberids
-  people = ASF::Person.preload(%w(uid createTimestamp asf-banned asf-altEmail mail loginShell))
-
-  _h2 'people who are not committers (excluding nologin)'
-
-  non_committers = people.reject { |p| p.nologin? or old.include? p.name or p.name == 'apldaptest'}
-  if non_committers.length > 0
-    _table do
-      _tr do
-        _th 'UID'
-        _th 'asf-banned?'
-        _th 'nologin?'
-        _th 'Date'
-        _th 'ICLA'
-        _th 'Subscriptions'
-        _th 'Moderates'
-      end
-      non_committers.sort_by(&:name).each do |p|
-        icla = ASF::ICLA.find_by_id(p.name)
-        _tr do
-          _td do
-            _a p.name, href: '/roster/committer/' + p.name
-          end
-          _td p.asf_banned?
-          _td p.nologin?
-          _td p.createDate
-          if icla
-            if icla.claRef
-              _td do
-                _a icla.claRef, href: ASF::SVN.svnpath!('iclas', icla.claRef)
-              end
-            else
-              _td icla.form
-            end
-          else
-            _td 'No ICLA entry found'
-          end
-          all_mail = p.all_mail
-          _td do
-            # keep only the list names
-            _ ASF::MLIST.subscriptions(all_mail)[:subscriptions].map{|x| x[0]}
-          end
-          _td do
-            _ ASF::MLIST.moderates(all_mail)[:moderates]
-          end
-        end
-      end
-    end
-  else
-    _p 'All LDAP people entries are committers'
-  end
-
-end
\ No newline at end of file
diff --git a/www/secretary/ldap-check.cgi b/www/secretary/ldap-check.cgi
index 5f041d5..29d2d08 100755
--- a/www/secretary/ldap-check.cgi
+++ b/www/secretary/ldap-check.cgi
@@ -20,6 +20,7 @@ LDAP people whould be committers (unles login is disabled)
 $LOAD_PATH.unshift '/srv/whimsy/lib'
 
 require 'whimsy/asf'
+require 'whimsy/asf/mlist'
 require 'wunderbar'
 
 _html do
@@ -35,7 +36,7 @@ _html do
 
   old = ASF::Group['committers'].memberids
   new = ASF::Committer.listids
-  people = ASF::Person.preload(%w(uid createTimestamp asf-banned loginShell))
+  people = ASF::Person.preload(%w(uid createTimestamp asf-banned asf-altEmail mail loginShell))
 
   _h2 'members and owners'
 
@@ -127,6 +128,8 @@ _html do
         _th 'asf-banned?'
         _th 'Date'
         _th 'ICLA'
+        _th 'Subscriptions'
+        _th 'Moderates'
       end
       non_committers.sort_by(&:name).each do |p|
         icla = ASF::ICLA.find_by_id(p.name)
@@ -147,6 +150,14 @@ _html do
           else
             _td 'No ICLA entry found'
           end
+          all_mail = p.all_mail
+          _td do
+            # keep only the list names
+            _ ASF::MLIST.subscriptions(all_mail)[:subscriptions].map{|x| x[0]}
+          end
+          _td do
+            _ ASF::MLIST.moderates(all_mail)[:moderates]
+          end
         end
       end
     end

Mime
View raw message