summaryrefslogtreecommitdiff
path: root/lib/api/pipelines.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/pipelines.rb')
-rw-r--r--lib/api/pipelines.rb23
1 files changed, 1 insertions, 22 deletions
diff --git a/lib/api/pipelines.rb b/lib/api/pipelines.rb
index e09d226a13f..9e888368e7b 100644
--- a/lib/api/pipelines.rb
+++ b/lib/api/pipelines.rb
@@ -69,19 +69,6 @@ module API
end
# rubocop: enable CodeReuse/ActiveRecord
- desc 'Gets a the latest pipeline for the project branch' do
- detail 'This feature was introduced in GitLab 12.3'
- success Entities::Pipeline
- end
- params do
- optional :ref, type: String, desc: 'branch ref of pipeline'
- end
- get ':id/pipelines/latest' do
- authorize! :read_pipeline, latest_pipeline
-
- present latest_pipeline, with: Entities::Pipeline
- end
-
desc 'Gets a specific pipeline for the project' do
detail 'This feature was introduced in GitLab 8.11'
success Entities::Pipeline
@@ -157,15 +144,7 @@ module API
helpers do
def pipeline
- strong_memoize(:pipeline) do
- user_project.ci_pipelines.find(params[:pipeline_id])
- end
- end
-
- def latest_pipeline
- strong_memoize(:latest_pipeline) do
- user_project.latest_pipeline_for_ref(params[:ref])
- end
+ @pipeline ||= user_project.ci_pipelines.find(params[:pipeline_id])
end
end
end