Move error check to pvt

This commit is contained in:
Oswaldo Ferreira 2019-02-12 19:57:57 -02:00
parent 7a8a5fe541
commit 16011886be

View file

@ -8,10 +8,6 @@ module MergeRequests
attr_reader :merge_request
# Overridden in EE.
def error_check!
end
# Overridden in EE.
def hooks_validation_pass?(_merge_request)
true
@ -19,6 +15,7 @@ module MergeRequests
# Overridden in EE.
def hooks_validation_error(_merge_request)
# No-op
end
def source
@ -31,6 +28,11 @@ module MergeRequests
private
# Overridden in EE.
def error_check!
# No-op
end
def raise_error(message)
raise MergeError, message
end