Skip to content
Browse files

use abbreviated label in email subjects

  • Loading branch information...
1 parent 3c62fbd commit 6d3f2e2b0774a3734b8fcbd23304e7b5e14392ee @alexeyv alexeyv committed Jan 18, 2010
Showing with 5 additions and 3 deletions.
  1. +5 −3 lib/builder_plugins/email_notifier.rb
View
8 lib/builder_plugins/email_notifier.rb
@@ -37,20 +37,22 @@ def from
def build_finished(build)
return if @emails.empty? or not build.failed?
- email :deliver_build_report, build, "#{build.project.name} build #{build.label} failed", "The build failed."
+ email :deliver_build_report, build, "#{build.project.name} build #{build.abbreviated_label} failed",
+ "The build failed."
end
def build_fixed(build, previous_build)
return if @emails.empty?
- email :deliver_build_report, build, "#{build.project.name} build #{build.label} fixed", "The build has been fixed."
+ email :deliver_build_report, build, "#{build.project.name} build #{build.abbreviated_label} fixed",
+ "The build has been fixed."
end
private
def email(template, build, *args)
BuildMailer.send(template, build, @emails, from, *args)
CruiseControl::Log.event("Sent e-mail to #{@emails.size == 1 ? "1 person" : "#{@emails.size} people"}", :debug)
- rescue => e
+ rescue
settings = ActionMailer::Base.smtp_settings.map { |k,v| " #{k.inspect} = #{v.inspect}" }.join("\n")
CruiseControl::Log.event("Error sending e-mail - current server settings are :\n#{settings}", :error)
raise

0 comments on commit 6d3f2e2

Please sign in to comment.
Something went wrong with that request. Please try again.