summaryrefslogtreecommitdiff
path: root/app/views/notify
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-10-04 02:55:08 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-10-04 02:55:08 +0800
commit4ae845d3dd21d2848fc76a79370c048b08aa081c (patch)
tree226c173ef5816c0f06b7cae7de22bd7ba24ec088 /app/views/notify
parentf39ba1bb5ed9c2421e60a618f71373c5d8dc94e9 (diff)
downloadgitlab-ce-4ae845d3dd21d2848fc76a79370c048b08aa081c.tar.gz
Update plain text version failed email
Diffstat (limited to 'app/views/notify')
-rw-r--r--app/views/notify/pipeline_failed_email.text.erb45
1 files changed, 30 insertions, 15 deletions
diff --git a/app/views/notify/pipeline_failed_email.text.erb b/app/views/notify/pipeline_failed_email.text.erb
index 88779244a4b..f6d6f3119d3 100644
--- a/app/views/notify/pipeline_failed_email.text.erb
+++ b/app/views/notify/pipeline_failed_email.text.erb
@@ -1,15 +1,30 @@
-Project: <%= @project.path_with_namespace %>
-Branch: <%= @pipeline.ref %>
-Commit: <%= @pipeline.short_sha %> (<%= @pipeline.sha %>)
-Commit Message: <%= @pipeline.git_commit_message %>
-Commit Author: <%= @pipeline.git_author_name %>
-Pusher: <%= @pipeline.user.try(:name) %>
-<% failed = @pipeline.statuses.latest.failed %>
-Pipeline #<%= @pipeline.id %> had <%= failed.size %> failed <%= 'job'.pluralize(failed.size) %>.
-
-<% failed.each do |job| %>
-ID: <%= job.id %>
-Stage: <%= job.stage %>
-Name: <%= job.name %>
-Trace: <%= job.trace_with_state[:html] %>
-<% end %>
+Uh oh, your CI pipeline has failed.
+
+Project: <%= @project.name %> ( <%= namespace_project_url(@project.namespace, @project) %> )
+Branch: <%= @pipeline.ref %> ( <%= namespace_project_commits_url(@project.namespace, @project, @pipeline.ref) %> )
+<% if @merge_request -%>
+Merge Request: <%= @merge_request.to_reference %> ( <%= namespace_project_merge_request_url(@project.namespace, @project, @merge_request) %> )
+<% end -%>
+
+Commit: <%= @pipeline.short_sha %> ( <%= namespace_project_commit_url(@project.namespace, @project, @pipeline.sha) %> )
+Commit Message: <%= @pipeline.git_commit_message.truncate(50) %>
+<% commit = @pipeline.commit -%>
+<% if commit.author.nil? -%>
+Commit Author: <%= commit.author_name %>
+<% else -%>
+Commit Author: <%= commit.author.name %> ( <%= user_url(commit.author) %> )
+<% end -%>
+
+<% failed = @pipeline.statuses.latest.failed -%>
+Pipeline #<%= @pipeline.id %> ( <%= namespace_project_pipeline_url(@project.namespace, @project, @pipeline.id) %> ) had <%= failed.size %> failed <%= 'build'.pluralize(failed.size) %>.
+
+<% failed.each do |build| -%>
+Build #<%= build.id %> ( <%= namespace_project_build_url(@project.namespace, @project, build.id) %> )
+Stage: <%= build.stage %>
+Name: <%= build.name %>
+Trace: <%= build.trace_with_state(last_lines: 10)[:text] %>
+
+<% end -%>
+
+Manage all notifications: <%= profile_notifications_url %>
+Help: <%= help_url %>