Commit c4e46c57 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Fix success status

parent 953a1094
...@@ -105,7 +105,8 @@ module Ci ...@@ -105,7 +105,8 @@ module Ci
end end
def stages_name def stages_name
statuses.order(:stage_idx).distinct.pluck(:stage) statuses.order(:stage_idx).distinct.
pluck(:stage, :stage_idx).map(&:first)
end end
def stages def stages
......
...@@ -26,7 +26,7 @@ module HasStatus ...@@ -26,7 +26,7 @@ module HasStatus
WHEN (#{builds})=(#{skipped}) THEN 'skipped' WHEN (#{builds})=(#{skipped}) THEN 'skipped'
WHEN (#{builds})=(#{success}) THEN 'success' WHEN (#{builds})=(#{success}) THEN 'success'
WHEN (#{builds})=(#{created}) THEN 'created' WHEN (#{builds})=(#{created}) THEN 'created'
WHEN (#{builds})=(#{success})+(#{skipped}) THEN 'skipped' WHEN (#{builds})=(#{success})+(#{skipped}) THEN 'success'
WHEN (#{builds})=(#{success})+(#{skipped})+(#{canceled}) THEN 'canceled' WHEN (#{builds})=(#{success})+(#{skipped})+(#{canceled}) THEN 'canceled'
WHEN (#{builds})=(#{created})+(#{skipped})+(#{pending}) THEN 'pending' WHEN (#{builds})=(#{created})+(#{skipped})+(#{pending}) THEN 'pending'
WHEN (#{running})+(#{pending})+(#{created})>0 THEN 'running' WHEN (#{running})+(#{pending})+(#{created})>0 THEN 'running'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment