diff options
author | François Bobot <francois.bobot@cea.fr> | 2013-12-11 14:41:07 +0100 |
---|---|---|
committer | François Bobot <francois.bobot@cea.fr> | 2013-12-11 14:41:07 +0100 |
commit | 7b3b63d4d49dd5c3876e2f0c02026dd9cb289f32 (patch) | |
tree | aa4971c95403aa72f3a70e73d83ee135ddfba81d /lib | |
parent | 880fef0d92ba9983babdf47c3d91526b4a5729f8 (diff) | |
download | gitlab-ce-7b3b63d4d49dd5c3876e2f0c02026dd9cb289f32.tar.gz |
[API] add parent_ids to specific commit informations
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/entities.rb | 4 | ||||
-rw-r--r-- | lib/api/repositories.rb | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 7daf8ace242..8d2f38c4daa 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -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 diff --git a/lib/api/repositories.rb b/lib/api/repositories.rb index c9422fdb165..76b5a9dfb2b 100644 --- a/lib/api/repositories.rb +++ b/lib/api/repositories.rb @@ -110,7 +110,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::RepoCommitDetail end # Get the diff for a specific commit of a project |