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
diff options
context:
space:
mode:
authorJacopo <beschi.jacopo@gmail.com>2018-05-31 10:47:53 +0300
committerJacopo <beschi.jacopo@gmail.com>2018-06-01 15:23:46 +0300
commit6ae16b6d4d9fb79b715875073bb78efd3f56929b (patch)
treee207b971b7c5d90ad6d72545e7270bd330c9a244 /lib/api/pipelines.rb
parent9b2e19fe37a5d1389e9f83531bb6ba4b06a66de0 (diff)
Rename variables_attributes => variables and adds spec for exclude/only option
Diffstat (limited to 'lib/api/pipelines.rb')
-rw-r--r--lib/api/pipelines.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/pipelines.rb b/lib/api/pipelines.rb
index 85e073ce662..378d9585eb8 100644
--- a/lib/api/pipelines.rb
+++ b/lib/api/pipelines.rb
@@ -41,7 +41,7 @@ module API
end
params do
requires :ref, type: String, desc: 'Reference'
- optional :variables_attributes, Array, desc: 'Array of variables available in the pipeline'
+ optional :variables, Array, desc: 'Array of variables available in the pipeline'
end
post ':id/pipeline' do
Gitlab::QueryLimiting.whitelist('https://gitlab.com/gitlab-org/gitlab-ce/issues/42124')
@@ -50,7 +50,7 @@ module API
new_pipeline = Ci::CreatePipelineService.new(user_project,
current_user,
- declared_params(include_missing: false))
+ declared_params(include_missing: false).merge(variables_attributes: params[:variables]))
.execute(:api, ignore_skip_ci: true, save_on_errors: false)
if new_pipeline.persisted?