summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorJacopo <beschi.jacopo@gmail.com>2018-06-01 15:52:24 +0200
committerJacopo <beschi.jacopo@gmail.com>2018-06-01 17:02:02 +0200
commit3871ea33ca524ef2d420a4ff311d8535622bd150 (patch)
tree199fa276cdc004a5df1ef2bea28ff637c99c5f62 /lib/api
parent6ae16b6d4d9fb79b715875073bb78efd3f56929b (diff)
downloadgitlab-ce-3871ea33ca524ef2d420a4ff311d8535622bd150.tar.gz
Review 1
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/pipelines.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/api/pipelines.rb b/lib/api/pipelines.rb
index 378d9585eb8..8374a57edfa 100644
--- a/lib/api/pipelines.rb
+++ b/lib/api/pipelines.rb
@@ -48,9 +48,13 @@ module API
authorize! :create_pipeline, user_project
+ pipeline_params = declared_params(include_missing: false)
+ .merge(variables_attributes: params[:variables])
+ .except(:variables)
+
new_pipeline = Ci::CreatePipelineService.new(user_project,
current_user,
- declared_params(include_missing: false).merge(variables_attributes: params[:variables]))
+ pipeline_params)
.execute(:api, ignore_skip_ci: true, save_on_errors: false)
if new_pipeline.persisted?