Commit bbcb12f2 authored by Douwe Maan's avatar Douwe Maan

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

parent ca56d9ff
......@@ -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')
......
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