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 7f310f66 Match all lists if no domain provided
7f310f66 is described below
commit 7f310f66bcc8d6d330d18da55b1aa0a1df49091f
Author: Sebb <[email protected]>
AuthorDate: Wed Apr 20 14:20:01 2022 +0100
Match all lists if no domain provided
---
lib/whimsy/asf/mlist.rb | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/whimsy/asf/mlist.rb b/lib/whimsy/asf/mlist.rb
index 4586360f..127275da 100644
--- a/lib/whimsy/asf/mlist.rb
+++ b/lib/whimsy/asf/mlist.rb
@@ -143,7 +143,8 @@ module ASF
# also returns the time when the data was last checked
# If podling==true, then also check for old-style podling names
# returns: [{[email protected]=>[email1, email2]}, mod-time]
- def self.list_moderators(mail_domain, podling=false)
+ # if mail_domain is nil, matches all lists except infra test lists
+ def self.list_moderators(mail_domain, _podling=false)
return nil, nil unless File.exist? LIST_MODS
@@ -155,7 +156,7 @@ module ASF
next if dom == 'incubator.apache.org' && list =~ /^infra-dev2?$/
# does the list match our target?
- next unless matches_list?(mail_domain, dom, list)
+ next unless mail_domain.nil? or matches_list?(mail_domain, dom, list)
moderators["#{list}@#{dom}"] = subs.sort
end