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: List PMC and nonPMC membership
Date Mon, 11 Mar 2019 16:27:14 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 927ebd9  List PMC and nonPMC membership
927ebd9 is described below

commit 927ebd92b6ad3aad86f5b7a2d19cffc2dd34d72b
Author: Sebb <sebb@apache.org>
AuthorDate: Mon Mar 11 16:27:09 2019 +0000

    List PMC and nonPMC membership
---
 www/roster/models/committer.rb | 20 ++++++++++-
 www/roster/views/person.js.rb  | 79 +++++++++++++++++++++++++++++++++---------
 2 files changed, 82 insertions(+), 17 deletions(-)

diff --git a/www/roster/models/committer.rb b/www/roster/models/committer.rb
index 51aca82..8bf4ce8 100644
--- a/www/roster/models/committer.rb
+++ b/www/roster/models/committer.rb
@@ -70,7 +70,8 @@ class Committer
     response[:groups] = person.services
     response[:committer] = []
     response[:podlings] = []
-    pmc_names = ASF::Committee.pmcs.map(&:name) # From CI
+    pmcs = ASF::Committee.pmcs
+    pmc_names = pmcs.map(&:name) # From CI
     podlings = ASF::Podling.current.map(&:id)
 
     # Add group names unless they are a PMC group
@@ -183,6 +184,23 @@ class Committer
       end
     end
 
+		response[:pmcs] = []
+		response[:nonpmcs] = []
+
+		pmcs.each do |pmc|
+  		response[:pmcs] << pmc.name if pmc.roster.include?(person.id)
+		  response[:chairOf] << pmc.name if pmc.chairs.map{|ch| ch[:id]}.include?(person.id)
+		end
+		response[:pmcs].sort!
+
+		response[:nonPMCchairOf] = [] # use separate list to avoid missing pmc-chair warnings
+    nonpmcs = ASF::Committee.nonpmcs
+    nonpmcs.each do |nonpmc|
+      response[:nonpmcs] << nonpmc.name if nonpmc.roster.include?(person.id)
+      response[:nonPMCchairOf] << nonpmc.name if nonpmc.chairs.map{|ch| ch[:id]}.include?(person.id)
+    end
+    response[:nonpmcs].sort!
+
     response
   end
 end
diff --git a/www/roster/views/person.js.rb b/www/roster/views/person.js.rb
index dc6f14d..3cc6a62 100644
--- a/www/roster/views/person.js.rb
+++ b/www/roster/views/person.js.rb
@@ -27,14 +27,14 @@ class Person < Vue
       _PersonUrls person: self
     end
 
-    # Committees
-    committees = @committer.committees
-    unless committees.empty?
+    # PMCs
+    noPMCsub = false    
+    pmcs = @committer.pmcs
+    unless pmcs.empty?
       _div.row do
-        _div.name 'Committees'
+        _div.name 'PMCs'
         _div.value do
-          noPMCsub = false
-          _ul committees do |pmc|
+          _ul pmcs do |pmc|
             _li {
               _a pmc, href: "committee/#{pmc}"
               if @committer.privateNosub
@@ -46,19 +46,48 @@ class Person < Vue
               if @committer.chairOf.include? pmc
                 _ ' (chair)'
               end
+              unless @committer.committees.include?(pmc)
+                _b ' (not in LDAP committee group)'
+              end
             }
           end
+          if noPMCsub
+                  _br
+            _p {
+              _ '(*) could not find a subscription to the private@ mailing list for this
PMC'
+              _br
+              _ 'Perhaps the subscription address is not listed in the LDAP record'
+              _br 
+              _ '(Note that digest subscriptions are not currently included)'
+            }
+          end
+        end
+      end
+    end
 
-	  if noPMCsub
-            _br
-	    _p {
-	      _ '(*) could not find a subscription to the private@ mailing list for this committee'
-	      _br
-	      _ 'Perhaps the subscription address is not listed in the LDAP record'
-        _br 
-        _ '(Note that digest subscriptions are not currently included)'
-	    }
-	  end
+    # Committees
+    missingPMCs = false
+    committees = @committer.committees
+    unless committees.empty?
+      _div.row do
+        _div.name 'Committees'
+        _div.value do
+          noPMCsub = false
+          _ul committees do |pmc|
+            next if  @committer.pmcs.include? pmc
+            missingPMCs = true
+            _li {
+              _a pmc, href: "committee/#{pmc}"
+              if @committer.chairOf.include? pmc
+                _ ' (chair)'
+              end
+            }
+          end
+          if missingPMCs
+            _ 'In LDAP committee group, but not on the corresponding PMC'
+          else
+            _ '(excludes PMCs listed above)'
+          end
         end
       end
     end
@@ -112,6 +141,24 @@ class Person < Vue
       end
     end
 
+    # Non-PMCs
+    nonpmcs = @committer.nonpmcs
+    unless nonpmcs.empty?
+      _div.row do
+        _div.name 'non-PMCs'
+        _div.value do
+          _ul nonpmcs do |nonpmc|
+            _li {
+              _a nonpmc, href: "nonpmc/#{nonpmc}"
+              if @committer.nonPMCchairOf.include? nonpmc
+                _ ' (chair)'
+              end
+            }
+          end
+        end
+      end
+    end
+    
     # Email addresses
     if @committer.mail
       _PersonEmail person: self


Mime
View raw message