Commit 6f6ba5a9 authored by Stan Hu's avatar Stan Hu

Merge branch 'sh-whitelist-internal-api' into 'master'

Whitelist query limits for internal API

Closes gitlab-ee#11450

See merge request gitlab-org/gitlab-ce!28037
parents 3a36c08b 0595c6d5
...@@ -265,6 +265,8 @@ module API ...@@ -265,6 +265,8 @@ module API
params[:changes], push_options.as_json) params[:changes], push_options.as_json)
if Feature.enabled?(:mr_push_options, default_enabled: true) if Feature.enabled?(:mr_push_options, default_enabled: true)
Gitlab::QueryLimiting.whitelist('https://gitlab.com/gitlab-org/gitlab-ce/issues/61359')
mr_options = push_options.get(:merge_request) mr_options = push_options.get(:merge_request)
output.merge!(process_mr_push_options(mr_options, project, user, params[:changes])) if mr_options.present? output.merge!(process_mr_push_options(mr_options, project, user, params[:changes])) if mr_options.present?
end end
......
...@@ -959,7 +959,9 @@ describe API::Internal do ...@@ -959,7 +959,9 @@ describe API::Internal do
it 'creates a new merge request' do it 'creates a new merge request' do
expect do expect do
Sidekiq::Testing.fake! do
post api('/internal/post_receive'), params: valid_params post api('/internal/post_receive'), params: valid_params
end
end.to change { MergeRequest.count }.by(1) end.to change { MergeRequest.count }.by(1)
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