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
Boxiang Sun
gitlab-ce
Commits
0b1d1931
Commit
0b1d1931
authored
Apr 12, 2017
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add issue representation
parent
0a52ae83
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
0 deletions
+57
-0
lib/github/representation/issue.rb
lib/github/representation/issue.rb
+57
-0
No files found.
lib/github/representation/issue.rb
0 → 100644
View file @
0b1d1931
module
Github
module
Representation
class
Issue
<
Representation
::
Base
def
iid
raw
[
'number'
]
end
def
title
raw
[
'title'
]
end
def
description
raw
[
'body'
]
||
''
end
def
milestone
return
unless
raw
[
'milestone'
].
present?
@milestone
||=
Github
::
Representation
::
Milestone
.
new
(
raw
[
'milestone'
])
end
def
author
@author
||=
Github
::
Representation
::
User
.
new
(
raw
[
'user'
])
end
def
assignee
return
unless
assigned?
@assignee
||=
Github
::
Representation
::
User
.
new
(
raw
[
'assignee'
])
end
def
state
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
def
pull_request?
raw
[
'pull_request'
].
present?
end
end
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