diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-02-21 17:50:22 -0600 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-02-23 09:31:57 -0600 |
commit | 030baf70d25a666b660b0024f000586631ee3daf (patch) | |
tree | 20dbdbb674e9a4fd0ad6d82161e34fd26aaf37cd /app/services/protected_branches | |
parent | c5a49cc3c56283ae5f015c808327b1a29ca09ed9 (diff) | |
download | gitlab-ce-030baf70d25a666b660b0024f000586631ee3daf.tar.gz |
Enable Performance/RedundantMerge
Diffstat (limited to 'app/services/protected_branches')
-rw-r--r-- | app/services/protected_branches/api_update_service.rb | 8 |
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) |