You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by Sam Ruby <ru...@apache.org> on 2016/03/16 18:39:00 UTC
[whimsy.git] [1/1] Commit 18e3662: cc board@ and dedup @apache.org
Commit 18e3662d16debf1c8c0b99f5e3465ebd2e233f31:
cc board@ and dedup @apache.org
Branch: refs/heads/master
Author: Sam Ruby <ru...@intertwingly.net>
Committer: Sam Ruby <ru...@intertwingly.net>
Pusher: rubys <ru...@apache.org>
------------------------------------------------------------
www/board/agenda/views/actions/feedback.json.rb | +++++++ ----
------------------------------------------------------------
22 changes: 14 additions, 8 deletions.
------------------------------------------------------------
diff --git a/www/board/agenda/views/actions/feedback.json.rb b/www/board/agenda/views/actions/feedback.json.rb
index d8c45b3..11f3738 100644
--- a/www/board/agenda/views/actions/feedback.json.rb
+++ b/www/board/agenda/views/actions/feedback.json.rb
@@ -45,20 +45,26 @@
next if text.strip.empty?
+ # build cc list
+ cc = ['board@apache.org']
+
+ if item['mail_list']
+ if item[:attach] =~ /^[A-Z]+/
+ cc << "private@#{item['mail_list']}.apache.org".untaint
+ elsif item['mail_list'].include? '@'
+ cc << item['mail_list'].untaint
+ else
+ cc << "#{item['mail_list']}@apache.org".untaint
+ end
+ end
+
# construct email
mail = Mail.new do
from from
to "#{item['owner']} <#{item['chair_email']}>".untaint
+ cc cc
subject "Board feedback on #{date} #{item['title']} report"
- if item['mail_list']
- if item[:attach] =~ /^[A-Z]+/
- cc "private@#{item['mail_list']}.apache.org".untaint
- else
- cc "#{item['mail_list']}@apache.org".untaint
- end
- end
-
body text.strip.untaint
end