Commit f0353a0c authored by Shinya Maeda's avatar Shinya Maeda

Merge branch 'sk/fix-tag-deletion-duplicate-events' into 'master'

Fix duplicated tag deletion activity and events

See merge request gitlab-org/gitlab!28861
parents 62ab5a53 0e606ca2
......@@ -18,11 +18,6 @@ module Tags
.new(project, current_user, tag: tag_name)
.execute
push_data = build_push_data(tag)
EventCreateService.new.push(project, current_user, push_data)
project.execute_hooks(push_data.dup, :tag_push_hooks)
project.execute_services(push_data.dup, :tag_push_hooks)
success('Tag was removed')
else
error('Failed to remove tag')
......@@ -38,14 +33,5 @@ module Tags
def success(message)
super().merge(message: message)
end
def build_push_data(tag)
Gitlab::DataBuilder::Push.build(
project: project,
user: current_user,
oldrev: tag.dereferenced_target.sha,
newrev: Gitlab::Git::BLANK_SHA,
ref: "#{Gitlab::Git::TAG_REF_PREFIX}#{tag.name}")
end
end
end
---
title: Fix duplicated activity and events on deletion of tag
merge_request: 28861
author: Sashi Kumar
type: fixed
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