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 cd62a730 Simplify - only need to set field if true
cd62a730 is described below
commit cd62a7307ba1378322c6ba1cbd53996d16ed2c9a
Author: Sebb <[email protected]>
AuthorDate: Sun Apr 23 17:01:28 2023 +0100
Simplify - only need to set field if true
---
www/roster/models/committee.rb | 4 ++--
www/roster/models/nonpmc.rb | 2 +-
www/roster/models/ppmc.rb | 14 ++++++--------
www/roster/views/nonpmc/members.js.rb | 4 ++--
www/roster/views/pmc/members.js.rb | 4 ++--
www/roster/views/ppmc/members.js.rb | 4 ++--
www/roster/views/ppmc/mentors.js.rb | 4 ++--
7 files changed, 17 insertions(+), 19 deletions(-)
diff --git a/www/roster/models/committee.rb b/www/roster/models/committee.rb
index b7c0e875..35b9aaaf 100644
--- a/www/roster/models/committee.rb
+++ b/www/roster/models/committee.rb
@@ -60,7 +60,7 @@ class Committee
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?
+ roster[key]['notSubbed'] = true if (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
@@ -77,7 +77,7 @@ class Committee
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[person.id]['notSubbed'] = (allMail & pSubs.map{|m|
ASF::Mail.to_canonical(m)}).empty?
+ roster[person.id]['notSubbed'] = true if (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
diff --git a/www/roster/models/nonpmc.rb b/www/roster/models/nonpmc.rb
index c19fc678..06137c4b 100644
--- a/www/roster/models/nonpmc.rb
+++ b/www/roster/models/nonpmc.rb
@@ -68,7 +68,7 @@ class NonPMC
}
if analysePrivateSubs
allMail = person.all_mail.map(&:downcase)
- roster[person.id]['notSubbed'] = (allMail & pSubs).empty?
+ roster[person.id]['notSubbed'] = true if (allMail & pSubs).empty?
unMatchedSubs.delete_if {|k| allMail.include? k.downcase}
unMatchedSecSubs.delete_if {|k| allMail.include? k.downcase}
end
diff --git a/www/roster/models/ppmc.rb b/www/roster/models/ppmc.rb
index e9a9c938..7b4ce67a 100644
--- a/www/roster/models/ppmc.rb
+++ b/www/roster/models/ppmc.rb
@@ -64,20 +64,18 @@ class PPMC
# Merge the PPMC members (owners)
owners.each do |person|
- notSubbed = false
- if analysePrivateSubs
- allMail = person.all_mail.map{|m| ASF::Mail.to_canonical(m.downcase)}
- notSubbed = (allMail & pSubs.map{|m| ASF::Mail.to_canonical(m)}).empty?
- unMatchedSubs.delete_if {|k| allMail.include?
ASF::Mail.to_canonical(k.downcase)}
- end
roster[person.id] = {
- notSubbed: notSubbed,
name: person.public_name,
member: person.asf_member?,
icommit: incubator_committers.include?(person),
role: 'PPMC Member',
githubUsername: (person.attrs['githubUsername'] || []).join(', ')
}
+ if analysePrivateSubs
+ allMail = person.all_mail.map{|m| ASF::Mail.to_canonical(m.downcase)}
+ roster[person.id]['notSubbed'] = true if (allMail & pSubs.map{|m|
ASF::Mail.to_canonical(m)}).empty?
+ unMatchedSubs.delete_if {|k| allMail.include?
ASF::Mail.to_canonical(k.downcase)}
+ end
end
# Finally merge the mentors
@@ -93,7 +91,7 @@ class PPMC
}
if analysePrivateSubs
allMail = person.all_mail.map{|m| ASF::Mail.to_canonical(m.downcase)}
- roster[person.id]['notSubbed'] = (allMail & pSubs.map{|m|
ASF::Mail.to_canonical(m)}).empty?
+ roster[person.id]['notSubbed'] = true if (allMail & pSubs.map{|m|
ASF::Mail.to_canonical(m)}).empty?
unMatchedSubs.delete_if {|k| allMail.include?
ASF::Mail.to_canonical(k.downcase)}
end
end
diff --git a/www/roster/views/nonpmc/members.js.rb
b/www/roster/views/nonpmc/members.js.rb
index 90b9c122..f16bf5ef 100644
--- a/www/roster/views/nonpmc/members.js.rb
+++ b/www/roster/views/nonpmc/members.js.rb
@@ -72,13 +72,13 @@ class NonPMCMember < Vue
end
if @@person.member
_td { _b { _a @@person.id, href: "committer/#{@@person.id}" }
- _a ' (*)', href: "nonpmc/#{@@nonpmc.id}#crosscheck" if
@@person.notSubbed and @@nonpmc.analysePrivateSubs
+ _a ' (*)', href: "nonpmc/#{@@nonpmc.id}#crosscheck" if
@@person.notSubbed
}
_td @@person.githubUsername
_td { _b @@person.name }
else
_td { _a @@person.id, href: "committer/#{@@person.id}"
- _a ' (*)', href: "nonpmc/#{@@nonpmc.id}#crosscheck" if
@@person.notSubbed and @@nonpmc.analysePrivateSubs
+ _a ' (*)', href: "nonpmc/#{@@nonpmc.id}#crosscheck" if
@@person.notSubbed
}
_td @@person.githubUsername
_td @@person.name
diff --git a/www/roster/views/pmc/members.js.rb
b/www/roster/views/pmc/members.js.rb
index 26cf9788..f904d802 100644
--- a/www/roster/views/pmc/members.js.rb
+++ b/www/roster/views/pmc/members.js.rb
@@ -183,13 +183,13 @@ class PMCMember < Vue
end
if @@person.member
_td { _b { _a @@person.id, href: "committer/#{@@person.id}" }
- _a ' (*)', href: "committee/#{@@committee.id}#crosscheck" if
@@person.notSubbed and @@committee.analysePrivateSubs
+ _a ' (*)', href: "committee/#{@@committee.id}#crosscheck" if
@@person.notSubbed
}
_td @@person.githubUsername
_td { _b @@person.name }
else
_td { _a @@person.id, href: "committer/#{@@person.id}"
- _a ' (*)', href: "committee/#{@@committee.id}#crosscheck" if
@@person.notSubbed and @@committee.analysePrivateSubs
+ _a ' (*)', href: "committee/#{@@committee.id}#crosscheck" if
@@person.notSubbed
}
_td @@person.githubUsername
_td @@person.name
diff --git a/www/roster/views/ppmc/members.js.rb
b/www/roster/views/ppmc/members.js.rb
index b37b6177..5927465e 100644
--- a/www/roster/views/ppmc/members.js.rb
+++ b/www/roster/views/ppmc/members.js.rb
@@ -137,13 +137,13 @@ class PPMCMember < Vue
if @@person.member
_td { _b { _a @@person.id, href: "committer/#{@@person.id}" }
- _a ' (*)', href: "ppmc/#{@@ppmc.id}#crosscheck" if
@@person.notSubbed and @@ppmc.analysePrivateSubs
+ _a ' (*)', href: "ppmc/#{@@ppmc.id}#crosscheck" if
@@person.notSubbed
}
_td @@person.githubUsername
_td { _b @@person.name }
else
_td { _a @@person.id, href: "committer/#{@@person.id}"
- _a ' (*)', href: "ppmc/#{@@ppmc.id}#crosscheck" if
@@person.notSubbed and @@ppmc.analysePrivateSubs
+ _a ' (*)', href: "ppmc/#{@@ppmc.id}#crosscheck" if
@@person.notSubbed
}
_td @@person.githubUsername
_td @@person.name
diff --git a/www/roster/views/ppmc/mentors.js.rb
b/www/roster/views/ppmc/mentors.js.rb
index 1a3be7c2..85646d59 100644
--- a/www/roster/views/ppmc/mentors.js.rb
+++ b/www/roster/views/ppmc/mentors.js.rb
@@ -59,13 +59,13 @@ class PPMCMentor < Vue
if @@person.member
_td { _b { _a @@person.id, href: "committer/#{@@person.id}" }
- _a ' (*)', href: "ppmc/#{@@ppmc.id}#crosscheck" if
@@person.notSubbed and @@ppmc.analysePrivateSubs
+ _a ' (*)', href: "ppmc/#{@@ppmc.id}#crosscheck" if
@@person.notSubbed
}
_td @@person.githubUsername
_td { _b @@person.name }
elsif @@person.name
_td { _a @@person.id, href: "committer/#{@@person.id}"
- _a ' (*)', href: "ppmc/#{@@ppmc.id}#crosscheck" if
@@person.notSubbed and @@ppmc.analysePrivateSubs
+ _a ' (*)', href: "ppmc/#{@@ppmc.id}#crosscheck" if
@@person.notSubbed
}
_td @@person.githubUsername
_td @@person.name