Commit 3f64dbb7 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Use ActiveSupport::Concern

parent 66a0ec77
module EE module EE
module API module API
module MergeRequests module MergeRequests
module ClassMethods extend ActiveSupport::Concern
class_methods do
def update_params_at_least_one_of def update_params_at_least_one_of
super.push(*%i[ super.push(*%i[
squash squash
...@@ -9,11 +11,7 @@ module EE ...@@ -9,11 +11,7 @@ module EE
end end
end end
# rubocop:disable Metrics/AbcSize prepended do
def self.prepended(api)
api.singleton_class.prepend(ClassMethods)
api.module_eval do
helpers do helpers do
params :merge_params_ee do params :merge_params_ee do
optional :squash, type: Grape::API::Boolean, desc: 'When true, the commits will be squashed into a single commit on merge' optional :squash, type: Grape::API::Boolean, desc: 'When true, the commits will be squashed into a single commit on merge'
...@@ -97,7 +95,5 @@ module EE ...@@ -97,7 +95,5 @@ module EE
end end
end end
end end
# rubocop:enable Metrics/AbcSize
end
end end
end end
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