diff options
Diffstat (limited to 'app/controllers/projects/pipelines_controller.rb')
-rw-r--r-- | app/controllers/projects/pipelines_controller.rb | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/app/controllers/projects/pipelines_controller.rb b/app/controllers/projects/pipelines_controller.rb index 10a6d2d3f26..477ba36e9d1 100644 --- a/app/controllers/projects/pipelines_controller.rb +++ b/app/controllers/projects/pipelines_controller.rb @@ -199,12 +199,7 @@ class Projects::PipelinesController < Projects::ApplicationController end def latest_pipeline - ref = params['ref'].presence || @project.default_branch - sha = @project.commit(ref)&.sha - - @project.ci_pipelines - .newest_first(ref: ref, sha: sha) - .first + @project.latest_pipeline_for_ref(params['ref']) &.present(current_user: current_user) end |