From b81fd244c274eab2f19aa5c8cda7edc133104044 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Tue, 15 Feb 2011 14:18:37 -0800 Subject: Only put the short commit message in email subjects The full commit message will still be in the body of the email. --- lib/jitterbug/Emailer.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/jitterbug') diff --git a/lib/jitterbug/Emailer.pm b/lib/jitterbug/Emailer.pm index d93ec79..0d4d7da 100644 --- a/lib/jitterbug/Emailer.pm +++ b/lib/jitterbug/Emailer.pm @@ -58,6 +58,8 @@ sub run { $body =~ s/%%SHA1%%/$sha1/g; $body =~ s/%%SUMMARY%%/$summary/g; + my ($short_message) = split /\n/, $message; + my $stuff = Email::Stuff->from($buildconf->{"on_${status}_from_email"}) # bug in Email::Stuff brakes chaining if $email is empty @@ -65,7 +67,7 @@ sub run { ->cc($buildconf->{"on_${status}_cc_email"}) ->text_body($body) ->subject( - $buildconf->{"on_${status}_subject_prefix"} . "$project @ $shortsha1 $message" + $buildconf->{"on_${status}_subject_prefix"} . "$project @ $shortsha1 $short_message" ); # Should we attach a build log for convenience? # ->attach(io('dead_bunbun_faked.gif')->all, -- cgit 1.4.1