summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-02-24 14:31:08 +0100
committerDouwe Maan <douwe@gitlab.com>2015-03-03 11:14:32 +0100
commitbbcb12f2719d5d8747339ad1bcb3457217870dc2 (patch)
tree01ce2febf7e3051de053bfe1a4b222a0ae8cfe21
parentca56d9ff9ff8b28172d5e3dae7e09b77e2e6b835 (diff)
downloadgitlab-ce-bbcb12f2719d5d8747339ad1bcb3457217870dc2.tar.gz
Execute tag_push services and hooks when tag is created through web UI.
-rw-r--r--app/services/create_tag_service.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/services/create_tag_service.rb b/app/services/create_tag_service.rb
index a735d3f7f20..850077006ea 100644
--- a/app/services/create_tag_service.rb
+++ b/app/services/create_tag_service.rb
@@ -21,12 +21,12 @@ class CreateTagService < BaseService
new_tag = repository.find_tag(tag_name)
if new_tag
- if project.gitlab_ci?
- push_data = create_push_data(project, current_user, new_tag)
- project.gitlab_ci_service.async_execute(push_data)
- end
-
EventCreateService.new.push_ref(project, current_user, new_tag, 'add', 'refs/tags')
+
+ push_data = create_push_data(project, current_user, new_tag)
+ project.execute_hooks(push_data.dup, :tag_push_hooks)
+ project.execute_services(push_data.dup, :tag_push_hooks)
+
success(new_tag)
else
error('Invalid reference name')