Commit 4e49f21b authored by Douwe Maan's avatar Douwe Maan

Set push data object kind in PushDataBuilder.

parent 606d24ff
......@@ -40,9 +40,7 @@ class CreateTagService < BaseService
end
def create_push_data(project, user, tag)
data = Gitlab::PushDataBuilder.
Gitlab::PushDataBuilder.
build(project, user, Gitlab::Git::BLANK_SHA, tag.target, "#{Gitlab::Git::TAG_REF_PREFIX}#{tag.name}", [])
data[:object_kind] = "tag_push"
data
end
end
......@@ -16,8 +16,6 @@ class GitTagPushService
private
def create_push_data(oldrev, newrev, ref)
data = Gitlab::PushDataBuilder.build(project, user, oldrev, newrev, ref, [])
data[:object_kind] = "tag_push"
data
Gitlab::PushDataBuilder.build(project, user, oldrev, newrev, ref, [])
end
end
......@@ -28,9 +28,10 @@ module Gitlab
# Get latest 20 commits ASC
commits_limited = commits.last(20)
type = Gitlab::Git.tag_ref?(ref) ? "tag_push" : "push"
# Hash to be passed as post_receive_data
data = {
object_kind: "push",
object_kind: type,
before: oldrev,
after: newrev,
ref: ref,
......
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