diff options
author | lulalala <mark@goodlife.tw> | 2018-05-09 17:49:33 +0800 |
---|---|---|
committer | Mark Chao <mchao@gitlab.com> | 2018-05-17 08:54:51 +0800 |
commit | dc174e9655267e89e1b7c63f8c9f4dac069069c7 (patch) | |
tree | 33cebe2481870434098f88f253090f2de91b873d /app/models/merge_request.rb | |
parent | 179a1ee7c669e758f8dc9fb5e9c8f2563012a6e1 (diff) | |
download | gitlab-ce-dc174e9655267e89e1b7c63f8c9f4dac069069c7.tar.gz |
Notify with email when merge request became unmergeable
Display MR unmergeable reasons
Diffstat (limited to 'app/models/merge_request.rb')
-rw-r--r-- | app/models/merge_request.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index dd4daf3711b..99687d305e7 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -125,6 +125,10 @@ class MergeRequest < ActiveRecord::Base Gitlab::Timeless.timeless(merge_request, &block) end + after_transition unchecked: :cannot_be_merged do |merge_request, transition| + NotificationService.new.merge_request_unmergeable(merge_request) + end + def check_state?(merge_status) [:unchecked, :cannot_be_merged_recheck].include?(merge_status.to_sym) end |