You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2017/10/11 16:34:53 UTC

[whimsy] branch master updated: change to dev list for inactive PMCs

This is an automated email from the ASF dual-hosted git repository.

rubys 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 a8d8e18  change to dev list for inactive PMCs
a8d8e18 is described below

commit a8d8e18769642146598869d06191a0f4c96ad772
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Wed Oct 11 12:34:18 2017 -0400

    change to dev list for inactive PMCs
---
 .../agenda/views/actions/send-reminders.json.rb    | 22 +++++++++++++---------
 www/board/agenda/views/buttons/reminders.js.rb     |  1 +
 2 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/www/board/agenda/views/actions/send-reminders.json.rb b/www/board/agenda/views/actions/send-reminders.json.rb
index 11c67e5..e5c7461 100644
--- a/www/board/agenda/views/actions/send-reminders.json.rb
+++ b/www/board/agenda/views/actions/send-reminders.json.rb
@@ -29,7 +29,6 @@ Agenda.parse(@agenda, :full).each do |item|
     next
   end
 
-
   # substitute [whoTo] values
   if item['to'] == 'president'
     reminder = @message.gsub('[whoTo]', 'operations@apache.org')
@@ -44,20 +43,25 @@ Agenda.parse(@agenda, :full).each do |item|
   reminder.gsub! '[project]', item['title'].gsub(/\W/, '-')
   subject = @subject.gsub('[project]', item['title']).untaint
 
+  # cc list
+  cclist = []
+  if item['mail_list']
+    if @selection == 'inactive'
+      cclist << "dev@#{item['mail_list']}.apache.org".untaint
+    elsif item[:attach] =~ /^[A-Z]+/
+      cclist << "private@#{item['mail_list']}.apache.org".untaint
+    else
+      cclist << "#{item['mail_list']}@apache.org".untaint
+    end
+  end
+
   # construct email
   mail = Mail.new do
     from from
     to "#{item['owner']} <#{item['chair_email']}>".untaint
+    cc cclist unless cclist.empty?
     subject subject
 
-    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 reminder.untaint
   end
 
diff --git a/www/board/agenda/views/buttons/reminders.js.rb b/www/board/agenda/views/buttons/reminders.js.rb
index 8c4269b..101f483 100644
--- a/www/board/agenda/views/buttons/reminders.js.rb
+++ b/www/board/agenda/views/buttons/reminders.js.rb
@@ -89,6 +89,7 @@ class InitialReminder < Vue
       agenda: Agenda.file,
       subject: @subject,
       message: @message,
+      selection: @selection,
       pmcs: []
     }
 

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <co...@whimsical.apache.org>'].