Commit 7a8a5fe5 authored by Oswaldo Ferreira's avatar Oswaldo Ferreira

Extend error checking to be overwritten in EE

parent 4e16edbe
...@@ -8,6 +8,10 @@ module MergeRequests ...@@ -8,6 +8,10 @@ module MergeRequests
attr_reader :merge_request attr_reader :merge_request
# Overridden in EE.
def error_check!
end
# Overridden in EE. # Overridden in EE.
def hooks_validation_pass?(_merge_request) def hooks_validation_pass?(_merge_request)
true true
......
...@@ -46,6 +46,8 @@ module MergeRequests ...@@ -46,6 +46,8 @@ module MergeRequests
end end
def error_check! def error_check!
super
error = error =
if @merge_request.should_be_rebased? if @merge_request.should_be_rebased?
'Only fast-forward merge is allowed for your project. Please update your source branch' 'Only fast-forward merge is allowed for your project. Please update your source branch'
......
...@@ -33,6 +33,8 @@ module MergeRequests ...@@ -33,6 +33,8 @@ module MergeRequests
end end
def error_check! def error_check!
super
error = error =
if Feature.disabled?(:merge_to_tmp_merge_ref_path, project) if Feature.disabled?(:merge_to_tmp_merge_ref_path, project)
'Feature is not enabled' 'Feature is not enabled'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment