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 13115de Move podlings away from .archives
13115de is described below
commit 13115de54a8b3de404edcb9bd8888333dc44947f
Author: Sebb <[email protected]>
AuthorDate: Wed Feb 9 15:49:33 2022 +0000
Move podlings away from .archives
---
lib/whimsy/asf/mlist.rb | 14 ++++++++++++++
www/roster/models/ppmc.rb | 9 ++++-----
www/roster/views/ppmc/main.js.rb | 4 +---
3 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/lib/whimsy/asf/mlist.rb b/lib/whimsy/asf/mlist.rb
index 8794368..b57063f 100644
--- a/lib/whimsy/asf/mlist.rb
+++ b/lib/whimsy/asf/mlist.rb
@@ -239,6 +239,18 @@ module ASF
end
end
+ # return a hash of lists for a project, together with privacy setting
+ # tlp - the prefix for the full domain
+ # This is a replacement for ASF::Mail.lists
+ def self.domain_lists(project, show_all)
+ lists = {}
+ list_types(show_all) do |dom, list, type|
+ if dom == "#{project}.apache.org"
+ lists["#{list}@#{dom}"] = type
+ end
+ end
+ lists
+ end
# return the [domain, list] for all entries in the subscriber listings
# the subscribers are not included
def self.each_list
@@ -428,6 +440,8 @@ end
if __FILE__ == $0
domain = ARGV.shift || 'whimsical'
+ p ASF::MLIST.domain_lists(domain, false)
+ p ASF::MLIST.domain_lists(domain, true)
p ASF::MLIST.list_subscribers(domain)
p ASF::MLIST.list_subscribers(domain, false, false, true)
p ASF::MLIST.list_subs(domain)
diff --git a/www/roster/models/ppmc.rb b/www/roster/models/ppmc.rb
index 80ea070..e9a9c93 100644
--- a/www/roster/models/ppmc.rb
+++ b/www/roster/models/ppmc.rb
@@ -1,13 +1,11 @@
+require 'whimsy/asf/mlist'
+
class PPMC
def self.serialize(id, env)
ppmc = ASF::Podling.find(id)
return unless ppmc # Not found
- lists = ASF::Mail.lists(true).select do |list, _|
- list =~ /^#{ppmc.mail_list}\b/
- end
-
committers = ppmc.members
owners = ppmc.owners
@@ -43,8 +41,9 @@ class PPMC
end
moderators.each { |_, mods| mods.each {|m| nonASFmails[m]='' unless
m.end_with? '@apache.org'} }
+ lists = ASF::MLIST.domain_lists(ppmc.mail_list, true)
else
- lists = lists.select {|_, mode| mode == 'public'}
+ lists = ASF::MLIST.domain_lists(ppmc.mail_list, false)
end
pmc = ASF::Committee.find('incubator')
diff --git a/www/roster/views/ppmc/main.js.rb b/www/roster/views/ppmc/main.js.rb
index 15d3b36..eab87db 100644
--- a/www/roster/views/ppmc/main.js.rb
+++ b/www/roster/views/ppmc/main.js.rb
@@ -168,9 +168,7 @@ class PPMC < Vue
else
_h2.mail! 'Mail lists'
_ul do
- for mail_name in @ppmc.mail
- parsed = mail_name.match(/^(.*?)-(.*)/)
- list_name = "#{parsed[2]}@#{parsed[1]}.apache.org"
+ for list_name in @ppmc.mail
_li do
_a list_name, href: 'https://lists.apache.org/list.html?' +
list_name