Ticket #11569: correct_commit_message.diff
| File correct_commit_message.diff, 2.3 kB (added by mainej, 6 months ago) |
|---|
-
lib/continuous_builder.rb
old new 92 92 @status =~ /[A-Z]\s+[\w\/]+/ 93 93 end 94 94 95 def current_revision96 info[' Revision'].to_i95 def last_revision 96 info['Last Changed Rev'].to_i 97 97 end 98 98 99 99 def url … … 101 101 end 102 102 103 103 def last_commit_message 104 execute("svn log", " -r HEAD-v")104 execute("svn log", " -r#{current_revision} -v") 105 105 end 106 106 107 107 def last_author … … 135 135 136 136 class MailNotifier < ActionMailer::Base 137 137 def failure(build, options, sent_at = Time.now) 138 @subject = "[#{options[:application_name]}] Build broken by #{build.checkout.last_author} (##{build.checkout. current_revision})"138 @subject = "[#{options[:application_name]}] Build broken by #{build.checkout.last_author} (##{build.checkout.last_revision})" 139 139 @body = [ build.checkout.last_commit_message, build.output ].join("\n\n") 140 140 141 141 @recipients, @from, @sent_on = options[:recipients], options[:sender], sent_at 142 142 end 143 143 144 144 def broken(build, options, sent_at = Time.now) 145 @subject = "[#{options[:application_name]}] Build still broken (##{build.checkout. current_revision})"145 @subject = "[#{options[:application_name]}] Build still broken (##{build.checkout.last_revision})" 146 146 @body = [ build.checkout.last_commit_message, build.output ].join("\n\n") 147 147 148 148 @recipients, @from, @sent_on = options[:recipients], options[:sender], sent_at 149 149 end 150 150 151 151 def revival(build, options, sent_at = Time.now) 152 @subject = "[#{options[:application_name]}] Build fixed by #{build.checkout.last_author} (##{build.checkout. current_revision})"152 @subject = "[#{options[:application_name]}] Build fixed by #{build.checkout.last_author} (##{build.checkout.last_revision})" 153 153 @body = [ build.checkout.last_commit_message ].join("\n\n") 154 154 155 155 @recipients, @from, @sent_on = options[:recipients], options[:sender], sent_at … … 177 177 end 178 178 179 179 def changeset(options, build) 180 options[:changeset_url] + build.checkout. current_revision.to_s180 options[:changeset_url] + build.checkout.last_revision.to_s 181 181 end 182 182 183 183 def deliver(to, subject, output = nil)