Commit 4ae845d3 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Update plain text version failed email

parent f39ba1bb
Project: <%= @project.path_with_namespace %> Uh oh, your CI pipeline has failed.
Branch: <%= @pipeline.ref %>
Commit: <%= @pipeline.short_sha %> (<%= @pipeline.sha %>) Project: <%= @project.name %> ( <%= namespace_project_url(@project.namespace, @project) %> )
Commit Message: <%= @pipeline.git_commit_message %> Branch: <%= @pipeline.ref %> ( <%= namespace_project_commits_url(@project.namespace, @project, @pipeline.ref) %> )
Commit Author: <%= @pipeline.git_author_name %> <% if @merge_request -%>
Pusher: <%= @pipeline.user.try(:name) %> Merge Request: <%= @merge_request.to_reference %> ( <%= namespace_project_merge_request_url(@project.namespace, @project, @merge_request) %> )
<% failed = @pipeline.statuses.latest.failed %> <% end -%>
Pipeline #<%= @pipeline.id %> had <%= failed.size %> failed <%= 'job'.pluralize(failed.size) %>.
Commit: <%= @pipeline.short_sha %> ( <%= namespace_project_commit_url(@project.namespace, @project, @pipeline.sha) %> )
<% failed.each do |job| %> Commit Message: <%= @pipeline.git_commit_message.truncate(50) %>
ID: <%= job.id %> <% commit = @pipeline.commit -%>
Stage: <%= job.stage %> <% if commit.author.nil? -%>
Name: <%= job.name %> Commit Author: <%= commit.author_name %>
Trace: <%= job.trace_with_state[:html] %> <% else -%>
<% end %> 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 %>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment