Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Edwards-Jones <jedwardsjones@gitlab.com>2018-03-26 03:43:43 +0300
committerJames Edwards-Jones <jedwardsjones@gitlab.com>2018-03-26 03:43:43 +0300
commita47565aa14e91841db7e404980df02775d7db90b (patch)
treeaee18bbf2b6cae1a99635f74620a6edc0507bb94 /lib/api/protected_branches.rb
parent391732a2c1b04baf565c77f2788a1ec035b1d85e (diff)
Updated grape to `1.0.2` to remove workaround
Diffstat (limited to 'lib/api/protected_branches.rb')
-rw-r--r--lib/api/protected_branches.rb7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/api/protected_branches.rb b/lib/api/protected_branches.rb
index c15c487deb4..c65105ff8b0 100644
--- a/lib/api/protected_branches.rb
+++ b/lib/api/protected_branches.rb
@@ -52,12 +52,7 @@ module API
conflict!("Protected branch '#{params[:name]}' already exists")
end
- # Replace with `declared(params)` after updating to grape v1.0.2
- # See https://github.com/ruby-grape/grape/pull/1710
- # and https://gitlab.com/gitlab-org/gitlab-ce/issues/40843
- declared_params = params.slice("name", "push_access_level", "merge_access_level", "allowed_to_push", "allowed_to_merge")
-
- api_service = ::ProtectedBranches::ApiService.new(user_project, current_user, declared_params)
+ api_service = ::ProtectedBranches::ApiService.new(user_project, current_user, declared(params))
protected_branch = api_service.create
if protected_branch.persisted?