diff options
author | Achilleas Pipinellis <axil@gitlab.com> | 2019-06-04 12:03:48 +0000 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2019-06-04 12:03:48 +0000 |
commit | 5fd70f1779fa9ea0bd5eda523833996f71d0e706 (patch) | |
tree | 27aa4cb0a5713aa7bca5eb8a5d1180d00e414089 /app/models/ci/pipeline.rb | |
parent | 72797b30479b8649cd4e4b42bb940093648daa9c (diff) | |
parent | d2ea615415311e7da1daf6b0a4e5c3a23fb2f1c2 (diff) | |
download | gitlab-ce-patch-66.tar.gz |
Merge branch 'master' into 'patch-66'patch-66
# Conflicts:
# doc/administration/high_availability/gitaly.md
Diffstat (limited to 'app/models/ci/pipeline.rb')
-rw-r--r-- | app/models/ci/pipeline.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index 80401ca0a1e..3727a9861aa 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -166,6 +166,16 @@ module Ci end end + after_transition any => ::Ci::Pipeline.completed_statuses do |pipeline| + pipeline.run_after_commit do + pipeline.all_merge_requests.each do |merge_request| + next unless merge_request.auto_merge_enabled? + + AutoMergeProcessWorker.perform_async(merge_request.id) + end + end + end + after_transition any => [:success, :failed] do |pipeline| pipeline.run_after_commit do PipelineNotificationWorker.perform_async(pipeline.id) |