Set push data object kind in PushDataBuilder.
This commit is contained in:
parent
606d24ff2d
commit
4e49f21b14
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue