Skip to content
Snippets Groups Projects
Commit 34975f01 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

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

This reverts commit 3d416f16.
parent 24332b7b
Branches
Tags
1 merge request!1136Revert satellites
Loading
@@ -13,11 +13,5 @@ module Files
Loading
@@ -13,11 +13,5 @@ module Files
def repository def repository
project.repository project.repository
end 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
end end
Loading
@@ -40,7 +40,7 @@ module Files
Loading
@@ -40,7 +40,7 @@ module Files
params[:content] params[:content]
end end
   
sha = repository.commit_file( created_successfully = repository.commit_file(
current_user, current_user,
file_path, file_path,
content, content,
Loading
@@ -49,8 +49,7 @@ module Files
Loading
@@ -49,8 +49,7 @@ module Files
) )
   
   
if sha if created_successfully
after_commit(sha)
success success
else else
error("Your changes could not be committed, because the file has been changed") error("Your changes could not be committed, because the file has been changed")
Loading
Loading
Loading
@@ -26,7 +26,7 @@ module Files
Loading
@@ -26,7 +26,7 @@ module Files
params[:content] params[:content]
end end
   
sha = repository.commit_file( repository.commit_file(
current_user, current_user,
path, path,
content, content,
Loading
@@ -34,7 +34,6 @@ module Files
Loading
@@ -34,7 +34,6 @@ module Files
params[:new_branch] || ref params[:new_branch] || ref
) )
   
after_commit(sha)
success success
rescue Gitlab::Satellite::CheckoutFailed => ex rescue Gitlab::Satellite::CheckoutFailed => ex
error("Your changes could not be committed because ref '#{ref}' could not be checked out", 400) 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.
Please register or to comment