gitlab-org--gitlab-foss/app/services/files/delete_service.rb
Dmitriy Zaporozhets 34690142bf
Implement commit transaction with pre-receive and post-receive hooks for web editor
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-08-13 12:57:24 +02:00

11 lines
300 B
Ruby

require_relative "base_service"
module Files
class DeleteService < Files::BaseService
def commit
CommitService.transaction(project, current_user, @target_branch) do |tmp_ref|
repository.remove_file(current_user, @file_path, @commit_message, tmp_ref)
end
end
end
end