Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
gitlab-ce
Commits
4e49f21b
Commit
4e49f21b
authored
Mar 13, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set push data object kind in PushDataBuilder.
parent
606d24ff
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
7 deletions
+4
-7
app/services/create_tag_service.rb
app/services/create_tag_service.rb
+1
-3
app/services/git_tag_push_service.rb
app/services/git_tag_push_service.rb
+1
-3
lib/gitlab/push_data_builder.rb
lib/gitlab/push_data_builder.rb
+2
-1
No files found.
app/services/create_tag_service.rb
View file @
4e49f21b
...
...
@@ -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
app/services/git_tag_push_service.rb
View file @
4e49f21b
...
...
@@ -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
lib/gitlab/push_data_builder.rb
View file @
4e49f21b
...
...
@@ -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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment