Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-07-22 11:46:04 +0300
committerRémy Coutable <remy@rymai.me>2016-07-22 11:46:04 +0300
commit50124864e389e6813296cc803efac76f7c23b633 (patch)
treef75e74fbab5674a9e89f26b33b8aa6634d5d5cf1 /lib
parentcbe787c5872318befb9d3cbd2918a44878e04497 (diff)
parent0b67945c99fde0d2c1ac6287f826001ef4c5d03b (diff)
Merge branch 'artifacts-from-ref-and-build-name-api' into 'master'
Simpler two queries than one JOIN with subquery This is a follow up from !5347 Originally it was: ``` ruby pipeline = pipelines.latest_successful_for(ref) builds.where(pipeline: pipeline).latest.with_artifacts ``` However MySQL would complain that we can't use `IN` against a subquery which has `LIMIT`. Using `INNER JOIN` would be a workaround, however, doing that is too complicated in current version of Rails. So let's just use two queries in this case. Closes #14419 See merge request !5388
Diffstat (limited to 'lib')
-rw-r--r--lib/api/builds.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/builds.rb b/lib/api/builds.rb
index 657d421fe97..be5a3484ec8 100644
--- a/lib/api/builds.rb
+++ b/lib/api/builds.rb
@@ -80,7 +80,7 @@ module API
# ref_name (required) - The ref from repository
# job (required) - The name for the build
# Example Request:
- # GET /projects/:id/artifacts/:ref_name/download?job=name
+ # GET /projects/:id/builds/artifacts/:ref_name/download?job=name
get ':id/builds/artifacts/:ref_name/download',
requirements: { ref_name: /.+/ } do
authorize_read_builds!