Commit 10421674 authored by Douwe Maan's avatar Douwe Maan

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

parent f2024b1e
......@@ -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')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment