summaryrefslogtreecommitdiff
path: root/app/models/merge_request.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/merge_request.rb')
-rw-r--r--app/models/merge_request.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb
index df162e4844c..0cfa4a17cf4 100644
--- a/app/models/merge_request.rb
+++ b/app/models/merge_request.rb
@@ -118,6 +118,10 @@ class MergeRequest < ApplicationRecord
end
end
+ after_transition any => [:merged, :closed] do |merge_request|
+ merge_request.run_after_commit { MergeTrain.process_async(merge_request) }
+ end
+
state :opened
state :closed
state :merged