diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-04-21 23:17:14 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-04-21 23:17:14 +0300 |
commit | ec586042e0f23696f0b3b34a7e7d5bf7c36ea2c7 (patch) | |
tree | 8d470e255e3976bed20072a1020dcad8bb0d71e0 /app/helpers/ci_status_helper.rb | |
parent | ff986c7040f594f19225274896fdbaa34bc8a713 (diff) |
Fix lastest commit status text on main project page
Diffstat (limited to 'app/helpers/ci_status_helper.rb')
-rw-r--r-- | app/helpers/ci_status_helper.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/app/helpers/ci_status_helper.rb b/app/helpers/ci_status_helper.rb index 2de9e0de310..7101c844056 100644 --- a/app/helpers/ci_status_helper.rb +++ b/app/helpers/ci_status_helper.rb @@ -22,6 +22,23 @@ module CiStatusHelper end end + def ci_text_for_status(status) + if detailed_status?(status) + return status.text + end + + case status + when 'success' + 'passed' + when 'success_with_warnings' + 'passed' + when 'manual' + 'blocked' + else + status + end + end + def ci_status_for_statuseable(subject) status = subject.try(:status) || 'not found' status.humanize |