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

Use ActiveSupport::Concern

parent 66a0ec77
module EE
module API
module MergeRequests
module ClassMethods
extend ActiveSupport::Concern
class_methods do
def update_params_at_least_one_of
super.push(*%i[
squash
......@@ -9,11 +11,7 @@ module EE
end
end
# rubocop:disable Metrics/AbcSize
def self.prepended(api)
api.singleton_class.prepend(ClassMethods)
api.module_eval do
prepended do
helpers 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'
......@@ -97,7 +95,5 @@ module EE
end
end
end
# rubocop:enable Metrics/AbcSize
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