diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-08-11 12:50:43 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-08-11 12:50:43 +0300 |
commit | 34975f0180b209cf3ac7cbe5955f83c10aa4c210 (patch) | |
tree | 4124d12ffb4de991ab36d494ba5c3c11d9d29bea | |
parent | 24332b7b99e63083a4914f149c43bf8cce5e7a92 (diff) |
Revert "Create activity event and execute hooks on web editor commit"
This reverts commit 3d416f1682c5e6a6ac1ea7013f66bbd0d23b452c.
-rw-r--r-- | app/services/files/base_service.rb | 6 | ||||
-rw-r--r-- | app/services/files/create_service.rb | 5 | ||||
-rw-r--r-- | app/services/files/update_service.rb | 3 |
3 files changed, 3 insertions, 11 deletions
diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index 29013be0f97..bd245100955 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -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 diff --git a/app/services/files/create_service.rb b/app/services/files/create_service.rb index bafc3565da1..3516cf30dbc 100644 --- a/app/services/files/create_service.rb +++ b/app/services/files/create_service.rb @@ -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") diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb index c972f8322bb..4d7ac3b7504 100644 --- a/app/services/files/update_service.rb +++ b/app/services/files/update_service.rb @@ -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) |