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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
f35573f1
Commit
f35573f1
authored
Apr 19, 2017
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract common attributes to Github::Representation::Base
parent
a32adb82
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
52 deletions
+12
-52
lib/github/representation/base.rb
lib/github/representation/base.rb
+12
-0
lib/github/representation/comment.rb
lib/github/representation/comment.rb
+0
-12
lib/github/representation/issue.rb
lib/github/representation/issue.rb
+0
-12
lib/github/representation/label.rb
lib/github/representation/label.rb
+0
-4
lib/github/representation/milestone.rb
lib/github/representation/milestone.rb
+0
-12
lib/github/representation/pull_request.rb
lib/github/representation/pull_request.rb
+0
-12
No files found.
lib/github/representation/base.rb
View file @
f35573f1
...
...
@@ -5,6 +5,18 @@ module Github
@raw
=
raw
end
def
url
raw
[
'url'
]
end
def
created_at
raw
[
'created_at'
]
end
def
updated_at
raw
[
'updated_at'
]
end
private
attr_reader
:raw
...
...
lib/github/representation/comment.rb
View file @
f35573f1
...
...
@@ -24,18 +24,6 @@ module Github
'LegacyDiffNote'
if
on_diff?
end
def
url
raw
[
'url'
]
end
def
created_at
raw
[
'created_at'
]
end
def
updated_at
raw
[
'updated_at'
]
end
private
def
generate_line_code
(
line
)
...
...
lib/github/representation/issue.rb
View file @
f35573f1
...
...
@@ -37,18 +37,6 @@ module Github
raw
[
'state'
]
==
'closed'
?
'closed'
:
'opened'
end
def
url
raw
[
'url'
]
end
def
created_at
raw
[
'created_at'
]
end
def
updated_at
raw
[
'updated_at'
]
end
def
assigned?
raw
[
'assignee'
].
present?
end
...
...
lib/github/representation/label.rb
View file @
f35573f1
...
...
@@ -8,10 +8,6 @@ module Github
def
title
raw
[
'name'
]
end
def
url
raw
[
'url'
]
end
end
end
end
lib/github/representation/milestone.rb
View file @
f35573f1
...
...
@@ -20,18 +20,6 @@ module Github
def
state
raw
[
'state'
]
==
'closed'
?
'closed'
:
'active'
end
def
url
raw
[
'url'
]
end
def
created_at
raw
[
'created_at'
]
end
def
updated_at
raw
[
'updated_at'
]
end
end
end
end
lib/github/representation/pull_request.rb
View file @
f35573f1
...
...
@@ -71,18 +71,6 @@ module Github
'opened'
end
def
url
raw
[
'url'
]
end
def
created_at
raw
[
'created_at'
]
end
def
updated_at
raw
[
'updated_at'
]
end
def
assigned?
raw
[
'assignee'
].
present?
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