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
911ce0d3
Commit
911ce0d3
authored
Apr 04, 2012
by
randx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reverted event data
parent
82c8c42a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
app/models/event/push_trait.rb
app/models/event/push_trait.rb
+7
-7
No files found.
app/models/event/push_trait.rb
View file @
911ce0d3
module
Event::PushTrait
as_trait
do
def
valid_push?
data
[
"ref"
]
data
[
:ref
]
rescue
=>
ex
false
end
def
tag?
data
[
"ref"
][
"refs/tags"
]
data
[
:ref
][
"refs/tags"
]
end
def
new_branch?
...
...
@@ -27,11 +27,11 @@ module Event::PushTrait
end
def
commit_from
data
[
"before"
]
data
[
:before
]
end
def
commit_to
data
[
"after"
]
data
[
:after
]
end
def
ref_name
...
...
@@ -43,15 +43,15 @@ module Event::PushTrait
end
def
branch_name
@branch_name
||=
data
[
"ref"
].
gsub
(
"refs/heads/"
,
""
)
@branch_name
||=
data
[
:ref
].
gsub
(
"refs/heads/"
,
""
)
end
def
tag_name
@tag_name
||=
data
[
"ref"
].
gsub
(
"refs/tags/"
,
""
)
@tag_name
||=
data
[
:ref
].
gsub
(
"refs/tags/"
,
""
)
end
def
commits
@commits
||=
data
[
"commits"
].
map
do
|
commit
|
@commits
||=
data
[
:commits
].
map
do
|
commit
|
project
.
commit
(
commit
[
"id"
])
end
end
...
...
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