mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-26 21:16:06 +10:00
Revert "Create activity event and execute hooks on web editor commit"
This reverts commit 3d416f1682.
This commit is contained in:
committed by
Valery Sizov
parent
fac581b170
commit
f22f7a6f51
@@ -13,11 +13,5 @@ module Files
|
||||
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
|
||||
|
||||
@@ -40,7 +40,7 @@ module Files
|
||||
params[:content]
|
||||
end
|
||||
|
||||
sha = repository.commit_file(
|
||||
created_successfully = repository.commit_file(
|
||||
current_user,
|
||||
file_path,
|
||||
content,
|
||||
@@ -49,8 +49,7 @@ module Files
|
||||
)
|
||||
|
||||
|
||||
if sha
|
||||
after_commit(sha)
|
||||
if created_successfully
|
||||
success
|
||||
else
|
||||
error("Your changes could not be committed, because the file has been changed")
|
||||
|
||||
@@ -26,7 +26,7 @@ module Files
|
||||
params[:content]
|
||||
end
|
||||
|
||||
sha = repository.commit_file(
|
||||
repository.commit_file(
|
||||
current_user,
|
||||
path,
|
||||
content,
|
||||
@@ -34,7 +34,6 @@ module Files
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user