Ecevute hooks and services when branches are created/deleted through web.
This commit is contained in:
parent
f2024b1e06
commit
10421674af
2 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue