Execute tag_push services and hooks when tag is created through web UI.

This commit is contained in:
Douwe Maan 2015-02-24 14:31:08 +01:00
parent ca56d9ff9f
commit bbcb12f271
1 changed files with 5 additions and 5 deletions

View File

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