summaryrefslogtreecommitdiff
path: root/app/views/notify
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2016-10-13 00:18:00 -0500
committerMike Greiling <mike@pixelcog.com>2016-10-13 00:18:00 -0500
commit36aea928a407376787a961bbc03ca3946a55902b (patch)
tree832234d07860c91ac7ec76985d1f3aa2384b40dc /app/views/notify
parent5c36905a75e621669ced3c9bf850294855c563bb (diff)
downloadgitlab-ce-36aea928a407376787a961bbc03ca3946a55902b.tar.gz
invert if statement order
Diffstat (limited to 'app/views/notify')
-rw-r--r--app/views/notify/pipeline_failed_email.html.haml8
-rw-r--r--app/views/notify/pipeline_failed_email.text.erb6
-rw-r--r--app/views/notify/pipeline_success_email.html.haml8
-rw-r--r--app/views/notify/pipeline_success_email.text.erb6
4 files changed, 14 insertions, 14 deletions
diff --git a/app/views/notify/pipeline_failed_email.html.haml b/app/views/notify/pipeline_failed_email.html.haml
index 7c95ea699a2..1f7b354f4bc 100644
--- a/app/views/notify/pipeline_failed_email.html.haml
+++ b/app/views/notify/pipeline_failed_email.html.haml
@@ -121,12 +121,12 @@
%td{style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:1.4;vertical-align:middle;padding-right:5px;"}
%img.avatar{height: "24", src: avatar_icon(commit.author || commit.author_email, 24), style: "display:block;border-radius:12px;margin:-2px 0;", width: "24"}/
%td{style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:1.4;vertical-align:middle;"}
- - if commit.author.nil?
- %span
- = commit.author_name
- - else
+ - if commit.author
%a.muted{href: user_url(commit.author), style: "color:#333333;text-decoration:none;"}
= commit.author.name
+ - else
+ %span
+ = commit.author_name
%tr.spacer
%td{style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;height:18px;font-size:18px;line-height:18px;"}
&nbsp;
diff --git a/app/views/notify/pipeline_failed_email.text.erb b/app/views/notify/pipeline_failed_email.text.erb
index b632d94facc..1b249c0cb7c 100644
--- a/app/views/notify/pipeline_failed_email.text.erb
+++ b/app/views/notify/pipeline_failed_email.text.erb
@@ -9,10 +9,10 @@ Merge Request: <%= @merge_request.to_reference %> ( <%= merge_request_url(@merge
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 -%>
+<% if commit.author -%>
Commit Author: <%= commit.author.name %> ( <%= user_url(commit.author) %> )
+<% else -%>
+Commit Author: <%= commit.author_name %>
<% end -%>
<% failed = @pipeline.statuses.latest.failed -%>
diff --git a/app/views/notify/pipeline_success_email.html.haml b/app/views/notify/pipeline_success_email.html.haml
index 23b4f645d78..81b32524fb2 100644
--- a/app/views/notify/pipeline_success_email.html.haml
+++ b/app/views/notify/pipeline_success_email.html.haml
@@ -121,12 +121,12 @@
%td{style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:1.4;vertical-align:middle;padding-right:5px;"}
%img.avatar{height: "24", src: avatar_icon(commit.author || commit.author_email, 24), style: "display:block;border-radius:12px;margin:-2px 0;", width: "24"}/
%td{style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:1.4;vertical-align:middle;"}
- - if commit.author.nil?
- %span
- = commit.author_name
- - else
+ - if commit.author
%a.muted{href: user_url(commit.author), style: "color:#333333;text-decoration:none;"}
= commit.author.name
+ - else
+ %span
+ = commit.author_name
%tr.spacer
%td{style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;height:18px;font-size:18px;line-height:18px;"}
&nbsp;
diff --git a/app/views/notify/pipeline_success_email.text.erb b/app/views/notify/pipeline_success_email.text.erb
index 15f22905bc6..7e7eec6d09c 100644
--- a/app/views/notify/pipeline_success_email.text.erb
+++ b/app/views/notify/pipeline_success_email.text.erb
@@ -9,10 +9,10 @@ Merge Request: <%= @merge_request.to_reference %> ( <%= merge_request_url(@merge
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 -%>
+<% if commit.author -%>
Commit Author: <%= commit.author.name %> ( <%= user_url(commit.author) %> )
+<% else -%>
+Commit Author: <%= commit.author_name %>
<% end -%>
<% build_count = @pipeline.statuses.latest.size -%>