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
attr_reader :merge_request
# Overridden in EE.
def error_check!
end
# Overridden in EE.
def hooks_validation_pass?(_merge_request)
true
......
......@@ -46,6 +46,8 @@ module MergeRequests
end
def error_check!
super
error =
if @merge_request.should_be_rebased?
'Only fast-forward merge is allowed for your project. Please update your source branch'
......
......@@ -33,6 +33,8 @@ module MergeRequests
end
def error_check!
super
error =
if Feature.disabled?(:merge_to_tmp_merge_ref_path, project)
'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