From 0a7ab639dd8c9b9e292237983f2a9ece37102b6f Mon Sep 17 00:00:00 2001
From: Lin Jen-Shin <godfat@godfat.org>
Date: Fri, 23 Sep 2016 19:05:07 +0800
Subject: [PATCH] Only show last 10 lines from trace

---
 app/views/notify/pipeline_failed_email.html.haml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/views/notify/pipeline_failed_email.html.haml b/app/views/notify/pipeline_failed_email.html.haml
index d7a626ba625..c6e8480e77f 100644
--- a/app/views/notify/pipeline_failed_email.html.haml
+++ b/app/views/notify/pipeline_failed_email.html.haml
@@ -157,7 +157,7 @@
                                   %tr.build-log
                                     %td{:colspan => "2", :style => "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:0 0 15px;"}
                                       %pre{:style => "font-family:Monaco,'Lucida Console','Courier New',Courier,monospace;background-color:#fafafa;border-radius:3px;overflow:hidden;white-space:pre-wrap;word-break:break-all;font-size:13px;line-height:1.4;padding:12px;color:#333333;margin:0;"}
-                                        = build.trace_with_state[:html].html_safe
+                                        = build.trace_html(last_lines: 10).html_safe
         %tr.footer
           %td{:style => "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:25px 0;font-size:13px;line-height:1.6;color:#5c5c5c;"}
             %img{:alt => "GitLab", :height => "33", :src => image_url('mailers/ci_pipeline_notif_v1/gitlab-logo-full-horizontal.gif'), :style => "display:block;margin:0 auto 1em;", :width => "90"}/
-- 
GitLab