summaryrefslogtreecommitdiff
path: root/app/services/protected_branches
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-02-21 17:50:22 -0600
committerDouwe Maan <douwe@selenight.nl>2017-02-23 09:31:57 -0600
commit030baf70d25a666b660b0024f000586631ee3daf (patch)
tree20dbdbb674e9a4fd0ad6d82161e34fd26aaf37cd /app/services/protected_branches
parentc5a49cc3c56283ae5f015c808327b1a29ca09ed9 (diff)
downloadgitlab-ce-030baf70d25a666b660b0024f000586631ee3daf.tar.gz
Enable Performance/RedundantMerge
Diffstat (limited to 'app/services/protected_branches')
-rw-r--r--app/services/protected_branches/api_update_service.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/services/protected_branches/api_update_service.rb b/app/services/protected_branches/api_update_service.rb
index 050cb3b738b..bdb0e0cc8bf 100644
--- a/app/services/protected_branches/api_update_service.rb
+++ b/app/services/protected_branches/api_update_service.rb
@@ -15,16 +15,16 @@ module ProtectedBranches
case @developers_can_push
when true
- params.merge!(push_access_levels_attributes: [{ access_level: Gitlab::Access::DEVELOPER }])
+ params[:push_access_levels_attributes] = [{ access_level: Gitlab::Access::DEVELOPER }]
when false
- params.merge!(push_access_levels_attributes: [{ access_level: Gitlab::Access::MASTER }])
+ params[:push_access_levels_attributes] = [{ access_level: Gitlab::Access::MASTER }]
end
case @developers_can_merge
when true
- params.merge!(merge_access_levels_attributes: [{ access_level: Gitlab::Access::DEVELOPER }])
+ params[:merge_access_levels_attributes] = [{ access_level: Gitlab::Access::DEVELOPER }]
when false
- params.merge!(merge_access_levels_attributes: [{ access_level: Gitlab::Access::MASTER }])
+ params[:merge_access_levels_attributes] = [{ access_level: Gitlab::Access::MASTER }]
end
service = ProtectedBranches::UpdateService.new(@project, @current_user, @params)