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

rubys pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/whimsy.git

The following commit(s) were added to refs/heads/master by this push:
       new  c6f4965   provide default subjects in responses
c6f4965 is described below

commit c6f4965f9acd24c84eb289a4a6ce3963750153c0
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Mon Oct 17 15:20:13 2016 -0400

    provide default subjects in responses
---
 www/secmail/models/message.rb           | 4 +++-
 www/secmail/views/actions/ccla.json.rb  | 1 +
 www/secmail/views/actions/grant.json.rb | 1 +
 www/secmail/views/actions/icla.json.rb  | 3 ++-
 4 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/www/secmail/models/message.rb b/www/secmail/models/message.rb
index 56b7ae0..a0e2af1 100644
--- a/www/secmail/models/message.rb
+++ b/www/secmail/models/message.rb
@@ -220,8 +220,10 @@ class Message
     # fill in the subject from the original email
     if self.subject =~ /^re:\s/i
       mail.subject = self.subject
-    else
+    elsif self.subject
       mail.subject = 'Re: ' + self.subject
+    elsif fields[:subject]
+      mail.subject = fields[:subject]
     end
 
     # fill in the subject from the original email
diff --git a/www/secmail/views/actions/ccla.json.rb 
b/www/secmail/views/actions/ccla.json.rb
index 4f69339..3998c3b 100644
--- a/www/secmail/views/actions/ccla.json.rb
+++ b/www/secmail/views/actions/ccla.json.rb
@@ -114,6 +114,7 @@ end
 task "email #@email" do
   # build mail from template
   mail = message.reply(
+    subject: @document,
     from: @from,
     to: "#{@contact.inspect} <#{@email}>",
     cc: [
diff --git a/www/secmail/views/actions/grant.json.rb 
b/www/secmail/views/actions/grant.json.rb
index 9c273aa..64e613c 100644
--- a/www/secmail/views/actions/grant.json.rb
+++ b/www/secmail/views/actions/grant.json.rb
@@ -105,6 +105,7 @@ end
 task "email #@email" do
   # build mail from template
   mail = message.reply(
+    subject: @document,
     from: @from,
     to: "#{@name.inspect} <#{@email}>",
     cc: [
diff --git a/www/secmail/views/actions/icla.json.rb 
b/www/secmail/views/actions/icla.json.rb
index df6b52f..0b0d087 100644
--- a/www/secmail/views/actions/icla.json.rb
+++ b/www/secmail/views/actions/icla.json.rb
@@ -100,7 +100,7 @@ task "svn commit foundation/officers/iclas.txt" do
     svn 'diff', dest
 
     # commit changes
-    svn 'commit', dest, '-m', "ICLA from #{@pubname}"
+    svn 'commit', dest, '-m', "ICLA for #{@pubname}"
   end
 end
 
@@ -127,6 +127,7 @@ task "email #@email" do
 
   # build mail from template
   mail = message.reply(
+    subject: "ICLA for #{@pubname}",
     from: @from,
     to: "#{@pubname.inspect} <#{@email}>",
     cc: [

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

Reply via email to