From 26df149efd3b962dafa3ccd9e6c1f1f54734477c Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Thu, 13 Jan 2011 18:10:12 -0500 Subject: Put commit message in subject of failure emails and improve body format --- lib/jitterbug/Emailer.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/jitterbug/Emailer.pm b/lib/jitterbug/Emailer.pm index 2af7590..3c40bfd 100644 --- a/lib/jitterbug/Emailer.pm +++ b/lib/jitterbug/Emailer.pm @@ -23,14 +23,20 @@ sub run { my $project = $task->project->name; my $tap_output = $self->{'tap_output'}; my $sha1 = $task->commit->sha256; + my $shortsha1 = substr($sha1, 0, 8); my $desc = JSON::decode_json( $task->commit->content ); my $email = $desc->{'author'}{'email'}; + my $message = $desc->{'message'}; my $header = $buildconf->{'on_failure_header'}; my $footer = $buildconf->{'on_failure_footer'}; my $body = <cc($buildconf->{'on_failure_cc_email'}) ->text_body($body) ->subject( - $buildconf->{'on_failure_subject_prefix'} . "$project @ $sha1" + $buildconf->{'on_failure_subject_prefix'} . "$project @ $shortsha1 $message" ); # Should we attach a build log for convenience? # ->attach(io('dead_bunbun_faked.gif')->all, -- cgit 1.4.1