diff options
author | James Edwards-Jones <jedwardsjones@gitlab.com> | 2017-05-04 19:50:09 +0300 |
---|---|---|
committer | James Edwards-Jones <jedwardsjones@gitlab.com> | 2017-05-05 17:41:36 +0300 |
commit | acd9cd0906046f3d11d95aa9dc9d1af0498ef2ef (patch) | |
tree | 72b9ec12960971bf9412a780539956b5d1ead8d9 /app/controllers/projects/pipelines_controller.rb | |
parent | 4c0adb9ee9ee6631b7cda6562d0e20b7daab8a9e (diff) |
Hides pipeline ‘Failed Jobs’ tab when no jobs have failed
Diffstat (limited to 'app/controllers/projects/pipelines_controller.rb')
-rw-r--r-- | app/controllers/projects/pipelines_controller.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/projects/pipelines_controller.rb b/app/controllers/projects/pipelines_controller.rb index 915f0bc63f7..3a56be2735a 100644 --- a/app/controllers/projects/pipelines_controller.rb +++ b/app/controllers/projects/pipelines_controller.rb @@ -71,7 +71,11 @@ class Projects::PipelinesController < Projects::ApplicationController end def failures - render_show + if @pipeline.statuses.latest.failed.present? + render_show + else + redirect_to pipeline_path(@pipeline) + end end def status |