diff options
author | Tomasz Maczukin <tomasz@maczukin.pl> | 2017-11-16 19:44:14 +0100 |
---|---|---|
committer | Tomasz Maczukin <tomasz@maczukin.pl> | 2017-11-28 00:36:48 +0100 |
commit | 8d3e80692cbeea06dd28a052554f0c262004e18d (patch) | |
tree | 7a685f0a443feaba39f777b372aa423c3656b673 /lib/api/entities.rb | |
parent | 83607a4daf497c73ddeb599194c36ff8ef491ed2 (diff) | |
download | gitlab-ce-8d3e80692cbeea06dd28a052554f0c262004e18d.tar.gz |
Add information about project
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r-- | lib/api/entities.rb | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 7d5d68c8f14..cea9e9a8028 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -80,16 +80,21 @@ module API expose :group_access, as: :group_access_level end - class BasicProjectDetails < Grape::Entity - expose :id, :description, :default_branch, :tag_list - expose :ssh_url_to_repo, :http_url_to_repo, :web_url + class ProjectIdentity < Grape::Entity + expose :id, :description expose :name, :name_with_namespace expose :path, :path_with_namespace + expose :created_at + end + + class BasicProjectDetails < ProjectIdentity + expose :default_branch, :tag_list + expose :ssh_url_to_repo, :http_url_to_repo, :web_url expose :avatar_url do |project, options| project.avatar_url(only_path: false) end expose :star_count, :forks_count - expose :created_at, :last_activity_at + expose :last_activity_at end class Project < BasicProjectDetails @@ -838,6 +843,10 @@ module API expose :pipeline, with: PipelineBasic end + class JobWithProject < Job + expose :project, with: ProjectIdentity + end + class Trigger < Grape::Entity expose :id expose :token, :description |