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.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/api/pipelines.rb b/lib/api/pipelines.rb
index 1cfb982c04b..ec34be3b414 100644
--- a/lib/api/pipelines.rb
+++ b/lib/api/pipelines.rb
@@ -58,7 +58,9 @@ module API
new_pipeline = Ci::CreatePipelineService.new(user_project,
current_user,
pipeline_params)
- .execute(:api, ignore_skip_ci: true, save_on_errors: false)
+ .execute(:api, ignore_skip_ci: true, save_on_errors: false).tap do |pipeline|
+ Ci::CreateMergeRequestPipelineService.new(pipeline).execute
+ end
if new_pipeline.persisted?
present new_pipeline, with: Entities::Pipeline