Skip to content

Commit

Permalink
Merge mail_list into main class
Browse files Browse the repository at this point in the history
  • Loading branch information
sebbASF committed May 27, 2024
1 parent e05573b commit 9353a8a
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 56 deletions.
42 changes: 42 additions & 0 deletions lib/whimsy/asf/committee.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,48 @@ def self.to_canonical(name)
@@namemap.call(name.downcase)
end

# mailing list for this committee. Generally returns the first name in
# the dns (e.g. whimsical). If so, it can be prefixed by a number of
# list names (e.g. dev, private) and <tt>.apache.org</tt> is to be
# appended. In some cases, the name contains an <tt>@</tt> sign and
# is the full name for the mail list.
def mail_list
case name.downcase
when 'comdev'
'community'
when 'httpcomponents'
'hc'
when 'whimsy'
'whimsical'

when 'brand'
'trademarks@apache.org'
when 'infrastructure'
'infra'
when 'dataprivacy'
'privacy@apache.org'
when 'legalaffairs' # Not sure what uses this
'legal-internal@apache.org'
when 'legal' # This seems to be used by the board agenda
'legal-private@apache.org'
when 'fundraising'
'fundraising-private@apache.org'
when 'marketingandpublicity'
'press@apache.org'
# now using private@tac.apache.org
# when 'tac'
# 'travel-assistance@apache.org'
when 'w3crelations'
'w3c@apache.org'
when 'concom'
'planners@apachecon.com'
when 'publicaffairs'
'public-affairs-private@apache.org'
else
name.downcase
end
end

# load committee info from <tt>committee-info.txt</tt>. Will not reparse
# if the file has already been parsed and the underlying file has not
# changed.
Expand Down
56 changes: 0 additions & 56 deletions lib/whimsy/asf/mail.rb
Original file line number Diff line number Diff line change
Expand Up @@ -331,60 +331,4 @@ def all_mail
end
end

class Committee
# mailing list for this committee. Generally returns the first name in
# the dns (e.g. whimsical). If so, it can be prefixed by a number of
# list names (e.g. dev, private) and <tt>.apache.org</tt> is to be
# appended. In some cases, the name contains an <tt>@</tt> sign and
# is the full name for the mail list.
def mail_list
case name.downcase
when 'comdev'
'community'
when 'httpcomponents'
'hc'
when 'whimsy'
'whimsical'

when 'brand'
'trademarks@apache.org'
when 'infrastructure'
'infra'
when 'dataprivacy'
'privacy@apache.org'
when 'legalaffairs' # Not sure what uses this
'legal-internal@apache.org'
when 'legal' # This seems to be used by the board agenda
'legal-private@apache.org'
when 'fundraising'
'fundraising-private@apache.org'
when 'marketingandpublicity'
'press@apache.org'
# now using private@tac.apache.org
# when 'tac'
# 'travel-assistance@apache.org'
when 'w3crelations'
'w3c@apache.org'
when 'concom'
'planners@apachecon.com'
when 'publicaffairs'
'public-affairs-private@apache.org'
else
name.downcase
end
end
end

class Podling
# base name used in constructing mailing list name.
def mail_list
case name.downcase
when 'odftoolkit'
'odf'
else
name.downcase
end
end
end

end
10 changes: 10 additions & 0 deletions lib/whimsy/asf/podling.rb
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,16 @@ def hasLDAP?
ASF::Project.find(id).hasLDAP?
end

# base name used in constructing mailing list name.
def mail_list
case name.downcase
when 'odftoolkit'
'odf'
else
name.downcase
end
end

# development mailing list associated with a given podling
def dev_mail_list
case name
Expand Down

0 comments on commit 9353a8a

Please sign in to comment.