Commit 840335ec authored by tiagonbotelho's avatar tiagonbotelho

creates the update_file method in repository.rb and applies changes accordingly

parent 3824f6fd
......@@ -731,7 +731,6 @@ class Repository
end
end
# previous_path, message, update
def update_file(user, path, content, branch, options={})
commit_with_hooks(user, branch) do |ref|
committer = user_to_committer(user)
......
......@@ -3,7 +3,6 @@ require_relative "base_service"
module Files
class UpdateService < Files::BaseService
def commit
repository.update_file(current_user, @file_path, @file_content,
@target_branch, previous_path: @previous_path,
message: @commit_message, update: true)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment