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: Cache the lists
Date Thu, 13 Dec 2018 12:03:31 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 0879891  Cache the lists
0879891 is described below

commit 0879891105152123cea65c22ccc0b7639ff1961d
Author: Sebb <sebb@apache.org>
AuthorDate: Thu Dec 13 12:03:16 2018 +0000

    Cache the lists
---
 www/roster/models/ppmc.rb | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/www/roster/models/ppmc.rb b/www/roster/models/ppmc.rb
index 7095a03..400a4e4 100644
--- a/www/roster/models/ppmc.rb
+++ b/www/roster/models/ppmc.rb
@@ -9,6 +9,8 @@ class PPMC
       list =~ /^(incubator-)?#{ppmc.mail_list}\b/
     end
 
+    members = ppmc.members
+
     # separate out the known ASF members and extract any matching committer details
     unknownSubs = []
     asfMembers = []
@@ -23,7 +25,7 @@ class PPMC
     unMatchedSubs = [] # unknown private@ subscribers
     currentUser = ASF::Person.find(env.user)
     analysePrivateSubs = false # whether to show missing private@ subscriptions
-    if currentUser.asf_member? or ppmc.members.include? currentUser
+    if currentUser.asf_member? or members.include? currentUser
       require 'whimsy/asf/mlist'
       moderators, modtime = ASF::MLIST.list_moderators(ppmc.mail_list, true)
       subscribers, subtime = ASF::MLIST.list_subscribers(ppmc.mail_list, true) # counts only
@@ -49,7 +51,7 @@ class PPMC
     incubator_committers = pmc.committers
     owners = ppmc.owners
 
-    roster = ppmc.members.map {|person|
+    roster = members.map {|person|
       notSubbed = false
       if analysePrivateSubs and owners.include? person
         allMail = person.all_mail.map{|m| m.downcase}
@@ -125,8 +127,8 @@ class PPMC
       status: ppmc.status,
       mentors: ppmc.mentors,
       hasLDAP: ppmc.hasLDAP?,
-      owners: ppmc.owners.map {|person| person.id},
-      committers: ppmc.members.map {|person| person.id},
+      owners: owners.map {|person| person.id},
+      committers: members.map {|person| person.id},
       roster: roster,
       mail: Hash[lists.sort],
       moderators: moderators,


Mime
View raw message