diff options
author | Shinya Maeda <shinya@gitlab.com> | 2018-11-02 20:21:14 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2018-11-02 20:21:14 +0900 |
commit | 54824e5b8f36c2ab2c41511bdc5e363e4c771124 (patch) | |
tree | 1aef39487177c9c3d8d932343f2633acd3283184 /lib | |
parent | 88224ccea67290e1bfa600379715ab278984ccdf (diff) | |
download | gitlab-ce-merge-request-pipeline.tar.gz |
Merge request pipelinemerge-request-pipeline
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/pipelines.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/ci/pipeline/chain/command.rb | 2 |
2 files changed, 4 insertions, 2 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 diff --git a/lib/gitlab/ci/pipeline/chain/command.rb b/lib/gitlab/ci/pipeline/chain/command.rb index 05978804d92..100b9521412 100644 --- a/lib/gitlab/ci/pipeline/chain/command.rb +++ b/lib/gitlab/ci/pipeline/chain/command.rb @@ -8,7 +8,7 @@ module Gitlab Command = Struct.new( :source, :project, :current_user, :origin_ref, :checkout_sha, :after_sha, :before_sha, - :trigger_request, :schedule, + :trigger_request, :schedule, :merge_request, :ignore_skip_ci, :save_incompleted, :seeds_block, :variables_attributes ) do |