Skip to content
Snippets Groups Projects
Commit f22f7a6f authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets Committed by Valery Sizov
Browse files

Revert "Create activity event and execute hooks on web editor commit"

This reverts commit 3d416f16.
parent fac581b1
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -13,11 +13,5 @@ def initialize(project, user, params, ref, path = nil)
def repository
project.repository
end
def after_commit(sha)
commit = repository.commit(sha)
full_ref = 'refs/heads/' + (params[:new_branch] || ref)
GitPushService.new.execute(project, current_user, commit.parent_id, sha, full_ref)
end
end
end
Loading
Loading
@@ -40,7 +40,7 @@ def execute
params[:content]
end
 
sha = repository.commit_file(
created_successfully = repository.commit_file(
current_user,
file_path,
content,
Loading
Loading
@@ -49,8 +49,7 @@ def execute
)
 
 
if sha
after_commit(sha)
if created_successfully
success
else
error("Your changes could not be committed, because the file has been changed")
Loading
Loading
Loading
Loading
@@ -26,7 +26,7 @@ def execute
params[:content]
end
 
sha = repository.commit_file(
repository.commit_file(
current_user,
path,
content,
Loading
Loading
@@ -34,7 +34,6 @@ def execute
params[:new_branch] || ref
)
 
after_commit(sha)
success
rescue Gitlab::Satellite::CheckoutFailed => ex
error("Your changes could not be committed because ref '#{ref}' could not be checked out", 400)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment