Execute tag_push services and hooks when tag is created through web UI.
This commit is contained in:
parent
ca56d9ff9f
commit
bbcb12f271
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue