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
Tatuya Kamada
gitlab-ce
Commits
1c0929f5
Commit
1c0929f5
authored
Jan 06, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5823 from bobot/feature/api_parent_ids
[API] add parent_ids to specific commit informations
parents
354a2854
7b3b63d4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
2 deletions
+11
-2
doc/api/repositories.md
doc/api/repositories.md
+6
-1
lib/api/entities.rb
lib/api/entities.rb
+4
-0
lib/api/repositories.rb
lib/api/repositories.rb
+1
-1
No files found.
doc/api/repositories.md
View file @
1c0929f5
...
...
@@ -259,7 +259,12 @@ Parameters:
"title"
:
"Sanitize for network graph"
,
"author_name"
:
"randx"
,
"author_email"
:
"dmitriy.zaporozhets@gmail.com"
,
"created_at"
:
"2012-09-20T09:06:12+03:00"
"created_at"
:
"2012-09-20T09:06:12+03:00"
,
"committed_date"
:
"2012-09-20T09:06:12+03:00"
,
"authored_date"
:
"2012-09-20T09:06:12+03:00"
,
"parent_ids"
:
[
"ae1d9fb46aa2b07ee9836d49862ec4e2c46fbbba"
]
}
```
...
...
lib/api/entities.rb
View file @
1c0929f5
...
...
@@ -91,6 +91,10 @@ module API
expose
:id
,
:short_id
,
:title
,
:author_name
,
:author_email
,
:created_at
end
class
RepoCommitDetail
<
RepoCommit
expose
:parent_ids
,
:committed_date
,
:authored_date
end
class
ProjectSnippet
<
Grape
::
Entity
expose
:id
,
:title
,
:file_name
expose
:author
,
using:
Entities
::
UserBasic
...
...
lib/api/repositories.rb
View file @
1c0929f5
...
...
@@ -112,7 +112,7 @@ module API
sha
=
params
[
:sha
]
commit
=
user_project
.
repository
.
commit
(
sha
)
not_found!
"Commit"
unless
commit
present
commit
,
with:
Entities
::
RepoCommit
present
commit
,
with:
Entities
::
RepoCommit
Detail
end
# Get the diff for a specific commit of a project
...
...
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