Class: ProtectedBranches::ApiService
- Inherits:
-
BaseService
- Object
- BaseService
- BaseService
- ProtectedBranches::ApiService
- Defined in:
- app/services/protected_branches/api_service.rb
Instance Attribute Summary
Attributes inherited from BaseService
Attributes inherited from BaseService
#current_user, #params, #project
Instance Method Summary collapse
Methods inherited from BaseService
#after_execute, #initialize, #refresh_cache
Methods inherited from BaseService
Methods included from BaseServiceUtility
#deny_visibility_level, #event_service, #log_error, #log_info, #notification_service, #system_hook_service, #todo_service, #visibility_level
Methods included from Gitlab::Allowable
Constructor Details
This class inherits a constructor from ProtectedBranches::BaseService
Instance Method Details
#create ⇒ Object
5 6 7 |
# File 'app/services/protected_branches/api_service.rb', line 5 def create ::ProtectedBranches::CreateService.new(project_or_group, @current_user, protected_branch_params).execute end |
#update(protected_branch) ⇒ Object
9 10 11 12 |
# File 'app/services/protected_branches/api_service.rb', line 9 def update(protected_branch) ::ProtectedBranches::UpdateService.new(project_or_group, @current_user, protected_branch_params(with_defaults: false)).execute(protected_branch) end |