diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-17 15:06:48 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-17 15:06:48 +0300 |
commit | bd860c22f6a4b9473cbddd34a53eead8235a7ea1 (patch) | |
tree | 3f955a56c2ac90497863da26902a42dba49f3466 /app/controllers | |
parent | e567b4c2df7dc4085d213db029eff6b6fcde0152 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers')
-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 |