Skip to content
Snippets Groups Projects
Commit 96b45411 authored by Douwe Maan's avatar Douwe Maan
Browse files

"CI build passed", not "CI build success"

parent 08175e3b
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -8,6 +8,10 @@ module CiStatusHelper
ci_icon_for_status(ci_commit.status)
end
 
def ci_status_label(ci_commit)
ci_label_for_status(ci_commit.status)
end
def ci_status_color(ci_commit)
case ci_commit.status
when 'success'
Loading
Loading
@@ -23,7 +27,15 @@ module CiStatusHelper
 
def ci_status_with_icon(status)
content_tag :span, class: "ci-status ci-#{status}" do
ci_icon_for_status(status) + ' '.html_safe + status
ci_icon_for_status(status) + ' '.html_safe + ci_label_for_status(status)
end
end
def ci_label_for_status(status)
if status == 'success'
'passed'
else
status
end
end
 
Loading
Loading
@@ -46,7 +58,7 @@ module CiStatusHelper
def render_ci_status(ci_commit)
link_to ci_status_path(ci_commit),
class: "c#{ci_status_color(ci_commit)}",
title: "Build status: #{ci_commit.status}",
title: "Build status: #{ci_status_label(ci_commit)}",
data: { toggle: 'tooltip', placement: 'left' } do
ci_status_icon(ci_commit)
end
Loading
Loading
Loading
Loading
@@ -3,7 +3,7 @@
- if ci_commit
= link_to ci_status_path(ci_commit), class: "ci-status ci-#{ci_commit.status}" do
= ci_status_icon(ci_commit)
= ci_commit.status
= ci_status_label(ci_commit)
 
= link_to commit.short_id, namespace_project_commit_path(project.namespace, project, commit), class: "commit_short_id"
= link_to_gfm commit.title, namespace_project_commit_path(project.namespace, project, commit), class: "commit-row-message"
Loading
Loading
Loading
Loading
@@ -45,7 +45,7 @@
= link_to ci_status_path(@ci_commit), class: "ci-status ci-#{@ci_commit.status}" do
= ci_status_icon(@ci_commit)
build:
= @ci_commit.status
= ci_status_label(@ci_commit)
 
.commit-info-row.branches
%i.fa.fa-spinner.fa-spin
Loading
Loading
- ci_commit = @merge_request.ci_commit
- if ci_commit
- status = ci_commit.status
.mr-widget-heading
.ci_widget{class: "ci-#{status}"}
.ci_widget{class: "ci-#{ci_commit.status}"}
= ci_status_icon(ci_commit)
%span CI build #{status}
%span CI build #{ci_status_label(ci_commit)}
for #{@merge_request.last_commit_short_sha}.
%span.ci-coverage
= link_to "View build details", ci_status_path(ci_commit)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment