diff options
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 |