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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
f7dd0674
Commit
f7dd0674
authored
Jul 25, 2012
by
Nihad Abbasov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
API: expose issues project id
parent
949b1df9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
doc/api/issues.md
doc/api/issues.md
+3
-0
lib/api/entities.rb
lib/api/entities.rb
+3
-1
No files found.
doc/api/issues.md
View file @
f7dd0674
...
@@ -10,6 +10,7 @@ GET /issues
...
@@ -10,6 +10,7 @@ GET /issues
[
[
{
{
"id"
:
43
,
"id"
:
43
,
"project_id"
:
8
,
"title"
:
"4xx/5xx pages"
,
"title"
:
"4xx/5xx pages"
,
"description"
:
""
,
"description"
:
""
,
"labels"
:
[
],
"labels"
:
[
],
...
@@ -28,6 +29,7 @@ GET /issues
...
@@ -28,6 +29,7 @@ GET /issues
},
},
{
{
"id"
:
42
,
"id"
:
42
,
"project_id"
:
8
,
"title"
:
"Add user settings"
,
"title"
:
"Add user settings"
,
"description"
:
""
,
"description"
:
""
,
"labels"
:
[
"labels"
:
[
...
@@ -91,6 +93,7 @@ Parameters:
...
@@ -91,6 +93,7 @@ Parameters:
```
json
```
json
{
{
"id"
:
42
,
"id"
:
42
,
"project_id"
:
8
,
"title"
:
"Add user settings"
,
"title"
:
"Add user settings"
,
"description"
:
""
,
"description"
:
""
,
"labels"
:
[
"labels"
:
[
...
...
lib/api/entities.rb
View file @
f7dd0674
...
@@ -31,7 +31,9 @@ module Gitlab
...
@@ -31,7 +31,9 @@ module Gitlab
end
end
class
Issue
<
Grape
::
Entity
class
Issue
<
Grape
::
Entity
expose
:id
,
:title
,
:description
expose
:id
expose
(
:project_id
)
{
|
issue
|
issue
.
project
.
id
}
expose
:title
,
:description
expose
:label_list
,
:as
=>
:labels
expose
:label_list
,
:as
=>
:labels
expose
:milestone
,
:using
=>
Entities
::
Milestone
expose
:milestone
,
:using
=>
Entities
::
Milestone
expose
:assignee
,
:author
,
:using
=>
Entities
::
UserBasic
expose
:assignee
,
:author
,
:using
=>
Entities
::
UserBasic
...
...
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