summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/services/create_branch_service.rb2
-rw-r--r--app/services/delete_branch_service.rb3
2 files changed, 5 insertions, 0 deletions
diff --git a/app/services/create_branch_service.rb b/app/services/create_branch_service.rb
index f835f06e72b..cf7ae4345f3 100644
--- a/app/services/create_branch_service.rb
+++ b/app/services/create_branch_service.rb
@@ -20,6 +20,8 @@ class CreateBranchService < BaseService
push_data = build_push_data(project, current_user, new_branch)
EventCreateService.new.push(project, current_user, push_data)
+ project.execute_hooks(push_data.dup, :push_hooks)
+ project.execute_services(push_data.dup, :push_hooks)
success(new_branch)
else
diff --git a/app/services/delete_branch_service.rb b/app/services/delete_branch_service.rb
index f2d5ed818c1..b19b112a0c4 100644
--- a/app/services/delete_branch_service.rb
+++ b/app/services/delete_branch_service.rb
@@ -28,6 +28,9 @@ class DeleteBranchService < BaseService
push_data = build_push_data(branch)
EventCreateService.new.push(project, current_user, push_data)
+ project.execute_hooks(push_data.dup, :push_hooks)
+ project.execute_services(push_data.dup, :push_hooks)
+
success('Branch was removed')
else
error('Failed to remove branch')