From f668a785cd7174b32e8070fde9cbb503caa04f8e Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Wed, 29 Jun 2016 11:06:41 -0600 Subject: Starting work on the warn_on_failure feature for the MR build status. --- app/helpers/ci_status_helper.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/helpers') diff --git a/app/helpers/ci_status_helper.rb b/app/helpers/ci_status_helper.rb index e6c99c9959e..c9217b846e7 100644 --- a/app/helpers/ci_status_helper.rb +++ b/app/helpers/ci_status_helper.rb @@ -17,6 +17,8 @@ module CiStatusHelper def ci_label_for_status(status) if status == 'success' 'passed' + elsif status == 'success_with_warnings' + 'passed with warnings' else status end @@ -27,6 +29,8 @@ module CiStatusHelper case status when 'success' 'check' + when 'success_with_warnings' + 'exclamation-triangle' when 'failed' 'close' when 'pending' -- cgit v1.2.1 From 737e5226f87b06c2fe8633819bce1fde16308f19 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Fri, 15 Jul 2016 14:08:27 -0600 Subject: Use switch statements instead of if/else chains. --- app/helpers/ci_status_helper.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/helpers') diff --git a/app/helpers/ci_status_helper.rb b/app/helpers/ci_status_helper.rb index c9217b846e7..44b8b7f6ca1 100644 --- a/app/helpers/ci_status_helper.rb +++ b/app/helpers/ci_status_helper.rb @@ -15,9 +15,10 @@ module CiStatusHelper end def ci_label_for_status(status) - if status == 'success' + case status + when 'success' 'passed' - elsif status == 'success_with_warnings' + when 'success_with_warnings' 'passed with warnings' else status -- cgit v1.2.1