whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Ruby <ru...@apache.org>
Subject [whimsy.git] [1/1] Commit 18e3662: cc board@ and dedup @apache.org
Date Wed, 16 Mar 2016 17:39:00 GMT
Commit 18e3662d16debf1c8c0b99f5e3465ebd2e233f31:
    cc board@ and dedup @apache.org


Branch: refs/heads/master
Author: Sam Ruby <rubys@intertwingly.net>
Committer: Sam Ruby <rubys@intertwingly.net>
Pusher: rubys <rubys@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
 

Mime
View raw message