diff options
author | Rémy Coutable <remy@rymai.me> | 2017-11-23 18:28:41 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-11-23 18:28:41 +0300 |
commit | 3026cb204742cc44047ea491ea12224ac2f8a007 (patch) | |
tree | a4f7f244eeff8ca3e4d374b66135fa7ec7748ab0 | |
parent | 505cba59eb3bea137de8eaa1f1468d13d710c9e9 (diff) | |
parent | fceffe4dca9af5ab3ffaa2e110c5fb4bad254950 (diff) |
Merge branch 'jej-rename-legacy-protected-branches-api-service' into 'master'
Renamed ProtectedBranches::ApiUpdateService to LegacyApiUpdateService
See merge request gitlab-org/gitlab-ce!15575
-rw-r--r-- | app/services/protected_branches/legacy_api_create_service.rb (renamed from app/services/protected_branches/api_create_service.rb) | 4 | ||||
-rw-r--r-- | app/services/protected_branches/legacy_api_update_service.rb (renamed from app/services/protected_branches/api_update_service.rb) | 4 | ||||
-rw-r--r-- | lib/api/branches.rb | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/app/services/protected_branches/api_create_service.rb b/app/services/protected_branches/legacy_api_create_service.rb index f2040dfa03a..e358fd0374e 100644 --- a/app/services/protected_branches/api_create_service.rb +++ b/app/services/protected_branches/legacy_api_create_service.rb @@ -1,9 +1,9 @@ -# The protected branches API still uses the `developers_can_push` and `developers_can_merge` +# The branches#protect API still uses the `developers_can_push` and `developers_can_merge` # flags for backward compatibility, and so performs translation between that format and the # internal data model (separate access levels). The translation code is non-trivial, and so # lives in this service. module ProtectedBranches - class ApiCreateService < BaseService + class LegacyApiCreateService < BaseService def execute push_access_level = if params.delete(:developers_can_push) diff --git a/app/services/protected_branches/api_update_service.rb b/app/services/protected_branches/legacy_api_update_service.rb index bdb0e0cc8bf..33176253ca2 100644 --- a/app/services/protected_branches/api_update_service.rb +++ b/app/services/protected_branches/legacy_api_update_service.rb @@ -1,9 +1,9 @@ -# The protected branches API still uses the `developers_can_push` and `developers_can_merge` +# The branches#protect API still uses the `developers_can_push` and `developers_can_merge` # flags for backward compatibility, and so performs translation between that format and the # internal data model (separate access levels). The translation code is non-trivial, and so # lives in this service. module ProtectedBranches - class ApiUpdateService < BaseService + class LegacyApiUpdateService < BaseService def execute(protected_branch) @developers_can_push = params.delete(:developers_can_push) @developers_can_merge = params.delete(:developers_can_merge) diff --git a/lib/api/branches.rb b/lib/api/branches.rb index cdef1b546a9..0791a110c39 100644 --- a/lib/api/branches.rb +++ b/lib/api/branches.rb @@ -81,9 +81,9 @@ module API service_args = [user_project, current_user, protected_branch_params] protected_branch = if protected_branch - ::ProtectedBranches::ApiUpdateService.new(*service_args).execute(protected_branch) + ::ProtectedBranches::LegacyApiUpdateService.new(*service_args).execute(protected_branch) else - ::ProtectedBranches::ApiCreateService.new(*service_args).execute + ::ProtectedBranches::LegacyApiCreateService.new(*service_args).execute end if protected_branch.valid? |