Ecevute hooks and services when branches are created/deleted through web.

This commit is contained in:
Douwe Maan 2015-03-13 14:56:08 +01:00
parent f2024b1e06
commit 10421674af
2 changed files with 5 additions and 0 deletions

View File

@ -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

View File

@ -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')