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: Roster needs to include committers as well
Date Fri, 01 Mar 2019 18:47:41 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 5302b49  Roster needs to include committers as well
5302b49 is described below

commit 5302b4989803cdfb7867d1c31f4a56e660455095
Author: Sebb <sebb@apache.org>
AuthorDate: Fri Mar 1 18:47:35 2019 +0000

    Roster needs to include committers as well
---
 www/roster/models/ppmc.rb | 24 +++++++++++++++++++-----
 1 file changed, 19 insertions(+), 5 deletions(-)

diff --git a/www/roster/models/ppmc.rb b/www/roster/models/ppmc.rb
index 3297f16..4aaadcc 100644
--- a/www/roster/models/ppmc.rb
+++ b/www/roster/models/ppmc.rb
@@ -51,23 +51,37 @@ class PPMC
     ipmc = pmc.owners
     incubator_committers = pmc.committers
 
-    roster = owners.map {|person|
+    # Preload the committers; if a person has another role it will be set up below
+    roster = committers.map {|person|
+      [person.id, {
+        # notSubbed does not apply
+        name: person.public_name, 
+        member: person.asf_member?,
+        icommit: incubator_committers.include?(person),
+        role: 'Committer',
+        githubUsername: (person.attrs['githubUsername'] || []).join(', ')
+      }]
+    }.to_h
+
+    # Merge the PPMC members (owners)
+    owners.each do |person|
       notSubbed = false
       if analysePrivateSubs and owners.include? person
         allMail = person.all_mail.map{|m| m.downcase}
         notSubbed = (allMail & pSubs).empty?
         unMatchedSubs.delete_if {|k| allMail.include? k.downcase}
       end
-      [person.id, {
+      roster[person.id] = {
         notSubbed: notSubbed,
         name: person.public_name, 
         member: person.asf_member?,
         icommit: incubator_committers.include?(person),
-        role: (owners.include?(person) ? 'PPMC Member' : 'Committer'),
+        role: 'PPMC Member',
         githubUsername: (person.attrs['githubUsername'] || []).join(', ')
-      }]
-    }.to_h
+      }
+    end
 
+    # Finally merge the mentors
     ppmc.mentors.each do |mentor|
       person = ASF::Person.find(mentor)
       roster[person.id] = {


Mime
View raw message