Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
10421674
Commit
10421674
authored
Mar 13, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ecevute hooks and services when branches are created/deleted through web.
parent
f2024b1e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
app/services/create_branch_service.rb
app/services/create_branch_service.rb
+2
-0
app/services/delete_branch_service.rb
app/services/delete_branch_service.rb
+3
-0
No files found.
app/services/create_branch_service.rb
View file @
10421674
...
...
@@ -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
...
...
app/services/delete_branch_service.rb
View file @
10421674
...
...
@@ -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'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment