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 ac31e5f Move deprecated check to library method
ac31e5f is described below
commit ac31e5f2c5aff2458065596f8476148a669e7400
Author: Sebb <[email protected]>
AuthorDate: Fri Mar 18 15:18:34 2022 +0000
Move deprecated check to library method
---
lib/whimsy/asf/mail.rb | 1 +
www/committers/moderate.cgi | 5 +----
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/lib/whimsy/asf/mail.rb b/lib/whimsy/asf/mail.rb
index 0219bb1..9678140 100644
--- a/lib/whimsy/asf/mail.rb
+++ b/lib/whimsy/asf/mail.rb
@@ -123,6 +123,7 @@ module ASF
allowed = []
parse_flags do |dom, list, _|
lid = archivelistid(dom, list)
+ next if self.deprecated.include? lid # deprecated in lid format
currently
next if self.cannot_sub.include? lid # probably unnecessary
if ldap_pmcs.include? dom.sub('.apache.org', '')
diff --git a/www/committers/moderate.cgi b/www/committers/moderate.cgi
index b20fcde..5e5afa1 100755
--- a/www/committers/moderate.cgi
+++ b/www/committers/moderate.cgi
@@ -22,14 +22,11 @@ ldap_pmcs = user.committees.map(&:mail_list)
ldap_pmcs += user.podlings.map(&:mail_list)
addrs = user.all_mail
-deprecated = ASF::Mail.deprecated # these are in lid format
-
tlp = []
podling = []
ASF::Mail.canmod(ldap_pmcs, false)
.sort
- .map { |dom, lname, lid|
- next if deprecated.include? lid
+ .map { |dom, lname, _lid|
list = "#{lname}@#{dom}"
host = dom.sub('.apache.org', '') # get the host name
if pmcs.include? host