Class: Ci::ChangeVariableService
- Inherits:
-
BaseContainerService
- Object
- BaseContainerService
- Ci::ChangeVariableService
- Defined in:
- app/services/ci/change_variable_service.rb
Instance Attribute Summary
Attributes inherited from BaseContainerService
#container, #current_user, #group, #params, #project
Instance Method Summary collapse
Methods inherited from BaseContainerService
#group_container?, #initialize, #namespace_container?, #project_container?, #project_group, #root_ancestor
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 BaseContainerService
Instance Method Details
#execute ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/services/ci/change_variable_service.rb', line 5 def execute case params[:action] when :create container.variables.create(create_variable_params) when :update variable.tap do |target_variable| target_variable.update(update_variable_params.except(:key)) end when :destroy variable.tap do |target_variable| target_variable.destroy end end end |