Created
November 2, 2010 13:10
-
-
Save timruffles/659581 to your computer and use it in GitHub Desktop.
Makes commit hashes and pivotal ids clickable - only need to pull in project github url
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cruisecontrol/app/views/build_mailer/build_report.html.erb | |
<% if Configuration.dashboard_url -%> | |
<%= @message %> | |
CHANGES | |
------- | |
<% | |
require 'uri' | |
repos = URI.parse(@build.project.source_control.repository) | |
for_viewing_url = "https://#{repos.host}#{repos.path.gsub(/\.git\/?$/,'')}" | |
%> | |
<%= @build.changeset.gsub(/([a-f0-9]{40})/,for_viewing_url + '/commit/\1">\1</a>').gsub(/\[([^\]]*)#(\d+)([^\]]*)\]/,'<a href="https://www.pivotaltracker.com/projects/85567?story_id=\2">[\1#\2\3]</a>') %> | |
<% unless @failures_and_errors.empty? -%> | |
TEST FAILURES AND ERRORS | |
----------------------- | |
<%= @failures_and_errors %> | |
<% end -%> | |
See <%= "#{@build.url}" %> for details. | |
<% else -%> | |
<%= @message %> | |
Note: if you set Configuration.dashboard_url in config/site_config.rb, you'd see a link to the build page here. | |
CHANGES | |
------- | |
<%= @build.changeset %> | |
BUILD LOG | |
--------- | |
<%= @build.output %> | |
PROJECT SETTINGS | |
---------------- | |
<%= @build.project_settings %> | |
<% end -%> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment