Class: Files::CreateService
- Inherits:
-
BaseService
- Object
- BaseService
- Commits::CreateService
- BaseService
- Files::CreateService
- Defined in:
- app/services/files/create_service.rb
Direct Known Subclasses
Constant Summary
Constants inherited from BaseService
Constants inherited from Commits::CreateService
Commits::CreateService::ValidationError
Instance Attribute Summary
Attributes inherited from BaseService
#current_user, #params, #project
Instance Method Summary collapse
Methods inherited from BaseService
#file_has_changed?, #initialize
Methods inherited from Commits::CreateService
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 Files::BaseService
Instance Method Details
#create_commit! ⇒ Object
5 6 7 8 9 10 11 |
# File 'app/services/files/create_service.rb', line 5 def create_commit! transformer = Lfs::FileTransformer.new(project, repository, @branch_name, start_branch_name: @start_branch) result = transformer.new_file(@file_path, @file_content) create_transformed_commit(result.content) end |