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/07/16 14:00:22 UTC
[whimsy] branch master updated: move pmc chair welcome message from
client to server
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 bb9f23f move pmc chair welcome message from client to server
bb9f23f is described below
commit bb9f23f9661ae2a1e15ec1578575d6fbb974f170
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Sun Jul 16 10:00:01 2017 -0400
move pmc chair welcome message from client to server
---
www/board/agenda/views/actions/todos.json.rb | 16 +++++++++++++++
www/board/agenda/views/pages/adjournment.js.rb | 27 +-------------------------
2 files changed, 17 insertions(+), 26 deletions(-)
diff --git a/www/board/agenda/views/actions/todos.json.rb b/www/board/agenda/views/actions/todos.json.rb
index ac96e32..ca1ddb5 100644
--- a/www/board/agenda/views/actions/todos.json.rb
+++ b/www/board/agenda/views/actions/todos.json.rb
@@ -69,6 +69,22 @@ if @add and env.password
chairs.add people
end
+ # send out congratulations email
+ ASF::Mail.configure
+ sender = ASF::Person.new(env.user)
+ mail = Mail.new do
+ from "#{sender.public_name} <#{...@apache.org>"
+ to people.map {|person| "#{person.public_name} <#{...@apache.org>"}
+ cc 'Apache Board <bo...@apache.org>'
+ body "Dear new PMC chairs,\n\nCongratulations on your new role at " +
+ "Apache. I've changed your LDAP privileges to reflect your new " +
+ "status.\n\nPlease read this and update the foundation records:\n" +
+ "https://svn.apache.org/repos/private/foundation/officers/advice-for-new-pmc-chairs.txt" +
+ "\n\nWarm regards,\n\n#{sender.public_name}"
+ end
+
+ mail.deliver!
+
minutes[:todos][:added] ||= []
minutes[:todos][:added] += people.map {|person| person.id}
end
diff --git a/www/board/agenda/views/pages/adjournment.js.rb b/www/board/agenda/views/pages/adjournment.js.rb
index 7d33405..c417041 100644
--- a/www/board/agenda/views/pages/adjournment.js.rb
+++ b/www/board/agenda/views/pages/adjournment.js.rb
@@ -171,7 +171,7 @@ class TodoActions < React
def render
if @@action == 'add'
- _p 'Add to pmc-chairs:'
+ _p 'Add to pmc-chairs and email welcome message:'
else
_p 'Remove from pmc-chairs:'
end
@@ -200,11 +200,6 @@ class TodoActions < React
_button.checklist.btn.btn_default 'Submit', disabled: @disabled,
onClick: self.submit
-
- if @@action == 'add'
- _button.checklist.btn.btn_default 'Email Congrats', disabled: @disabled,
- onClick: self.launch_email_client
- end
end
def submit()
@@ -218,26 +213,6 @@ class TodoActions < React
Todos.set todos
end
end
-
- # launch email client, pre-filling the destination, subject, and body
- def launch_email_client()
- people = []
- @people.each do |person|
- people << "#{person.name} <#{person.email}>" if @checked[person.id]
- end
- destination = "mailto:#{people.join(',')}?cc=board@apache.org"
-
- subject = "Congratulations on your new role at Apache"
- body = "Dear new PMC chairs,\n\nCongratulations on your new role at " +
- "Apache. I've changed your LDAP privileges to reflect your new " +
- "status.\n\nPlease read this and update the foundation records:\n" +
- "https://svn.apache.org/repos/private/foundation/officers/advice-for-new-pmc-chairs.txt" +
- "\n\nWarm regards,\n\n#{Server.username}"
-
- window.location = destination +
- "&subject=#{encodeURIComponent(subject)}" +
- "&body=#{encodeURIComponent(body)}"
- end
end
########################################################################
--
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <co...@whimsical.apache.org>'].