summaryrefslogtreecommitdiff
path: root/app/services
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-11-09 15:29:19 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-11-09 15:33:55 +0100
commit4a7fcc2af6eba65dff48b25c81d5925311fa933d (patch)
treeab4f93d7263d6d94f12dd84a2d932e753ebb09f2 /app/services
parent5328e3b1276d8eef15b6636a1d5b1c7a57d31ea6 (diff)
downloadgitlab-ce-4a7fcc2af6eba65dff48b25c81d5925311fa933d.tar.gz
Stop environments for branch after branch removal
Diffstat (limited to 'app/services')
-rw-r--r--app/services/delete_branch_service.rb2
-rw-r--r--app/services/git_push_service.rb2
2 files changed, 1 insertions, 3 deletions
diff --git a/app/services/delete_branch_service.rb b/app/services/delete_branch_service.rb
index ec8ee7452d6..3e5dd4ebb86 100644
--- a/app/services/delete_branch_service.rb
+++ b/app/services/delete_branch_service.rb
@@ -21,8 +21,6 @@ class DeleteBranchService < BaseService
return error('You dont have push access to repo', 405)
end
- # StopEnvironmentService
-
if repository.rm_branch(current_user, branch_name)
success('Branch was removed')
else
diff --git a/app/services/git_push_service.rb b/app/services/git_push_service.rb
index de313095bed..ec1c2f61c27 100644
--- a/app/services/git_push_service.rb
+++ b/app/services/git_push_service.rb
@@ -21,7 +21,7 @@ class GitPushService < BaseService
@project.repository.after_push_commit(branch_name, params[:newrev])
if push_remove_branch?
- @project.repository.after_remove_branch
+ @project.repository.after_remove_branch(current_user, branch_name)
@push_commits = []
elsif push_to_new_branch?
@project.repository.after_create_branch