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 32cc2f1 Move deprecated check to library method
32cc2f1 is described below
commit 32cc2f1ed1d3c2ea0679fadfe2e1f8d09cd0557f
Author: Sebb <[email protected]>
AuthorDate: Fri Mar 18 15:30:15 2022 +0000
Move deprecated check to library method
---
lib/whimsy/asf/mail.rb | 1 +
www/committers/subscribe.cgi | 5 +----
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/lib/whimsy/asf/mail.rb b/lib/whimsy/asf/mail.rb
index 9678140..f34b268 100644
--- a/lib/whimsy/asf/mail.rb
+++ b/lib/whimsy/asf/mail.rb
@@ -83,6 +83,7 @@ module ASF
allowed = []
parse_flags do |dom, list, f|
lid = archivelistid(dom, list)
+ next if self.deprecated.include? lid # deprecated in lid format
currently
next if self.cannot_sub.include? lid # probably unnecessary
cansub = false
diff --git a/www/committers/subscribe.cgi b/www/committers/subscribe.cgi
index c7cfda3..7548262 100755
--- a/www/committers/subscribe.cgi
+++ b/www/committers/subscribe.cgi
@@ -40,15 +40,12 @@ ldap_pmcs += user.podlings.map(&:mail_list) unless
user.asf_member?
addrs = user.all_mail
seen = {}
-deprecated = ASF::Mail.deprecated
cannot_unsub = ASF::Mail.cannot_unsub
lists = ASF::Mail.cansub(user.asf_member?, ASF.pmc_chairs.include?(user),
ldap_pmcs, false)
.map { |dom, _, list|
host = dom.sub('.apache.org', '') # get the host name
- if deprecated.include? list
- list = nil # bit of a hack to avoid scanning twice
- elsif dom == 'apache.org'
+ if dom == 'apache.org'
seen[list] = 0 # ASF
elsif pmcs.include? host
seen[list] = 1 # TLP