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/03/11 13:41:33 UTC
[whimsy] branch master updated: Also do checks for PMC CI entries
not in LDAP/owners
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 e531695 Also do checks for PMC CI entries not in LDAP/owners
e531695 is described below
commit e53169585ed5b91e841f34de2f6d5d7d3fd291ae
Author: Sebb <se...@apache.org>
AuthorDate: Mon Mar 11 13:41:29 2019 +0000
Also do checks for PMC CI entries not in LDAP/owners
---
www/roster/models/committee.rb | 23 +++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/www/roster/models/committee.rb b/www/roster/models/committee.rb
index a9ef2c1..1907daa 100644
--- a/www/roster/models/committee.rb
+++ b/www/roster/models/committee.rb
@@ -53,13 +53,28 @@ class Committee
lists = lists.select {|list, mode| mode == 'public'}
end
- roster = pmc.roster.dup
- roster.each {|key, info| info[:role] = 'PMC member'}
+ roster = pmc.roster.dup # from committee-info
+ # ensure PMC members are all processed even they don't belong to the owner group
+ roster.each do |key, info|
+ info[:role] = 'PMC member'
+ next if pmc.ownerids.include?(key) # skip the rest (expensive) if person is in the owner group
+ person = ASF::Person[key]
+ if analysePrivateSubs
+ # Analyse the subscriptions, matching against canonicalised personal emails
+ allMail = person.all_mail.map{|m| ASF::Mail.to_canonical(m.downcase)}
+ # pSubs is already downcased
+ # TODO should it be canonicalised as well above?
+ roster[key]['notSubbed'] = (allMail & pSubs.map{|m| ASF::Mail.to_canonical(m)}).empty?
+ unMatchedSubs.delete_if {|k| allMail.include? ASF::Mail.to_canonical(k.downcase)}
+ unMatchedSecSubs.delete_if {|k| allMail.include? ASF::Mail.to_canonical(k.downcase)}
+ end
+ roster[key]['githubUsername'] = (person.attrs['githubUsername'] || []).join(', ')
+ end
- members.each do |person|
+ members.each do |person| # process the owners
roster[person.id] ||= {
name: person.public_name,
- role: 'PMC member'
+ role: 'PMC member' # TODO not strictly true, as CI is the canonical source
}
if analysePrivateSubs
# Analyse the subscriptions, matching against canonicalised personal emails