From 444b03bad2cf9e8c09736abb589be603c527ea2b Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 15 May 2013 11:43:06 +0200 Subject: [PATCH] Omit the system type if it's part of the job name --- src/lib/Hydra/Plugin/EmailNotification.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/Hydra/Plugin/EmailNotification.pm b/src/lib/Hydra/Plugin/EmailNotification.pm index f6e05494..e8223571 100644 --- a/src/lib/Hydra/Plugin/EmailNotification.pm +++ b/src/lib/Hydra/Plugin/EmailNotification.pm @@ -55,7 +55,7 @@ sub getPrevBuild { my $template = < [grep { $_->id != $build->id } @builds] , baseurl => $self->{config}->{'base_uri'} || "http://localhost:3000" , showJobName => \&showJobName, showStatus => \&showStatus + , showSystem => index($build->job->name, $build->system) == -1 }; my $body; @@ -146,7 +147,7 @@ sub buildFinished { header => [ To => $to, From => "Hydra Build Daemon <$sender>", - Subject => showStatus($build) . ": Hydra job " . showJobName($build) . " on " . $build->system, + Subject => showStatus($build) . ": Hydra job " . showJobName($build) . ($vars->{showSystem} ? " on " . $build->system : ""), 'X-Hydra-Instance' => $vars->{baseurl}, 'X-Hydra-Project' => $build->project->name, 'X-Hydra-Jobset' => $build->jobset->name,