summaryrefslogtreecommitdiff
path: root/lib/api/entities.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-07-10 14:03:00 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-07-10 14:03:00 +0300
commit6a9aed1e878bc8651243d645d0a9d2f7da33f248 (patch)
treeb70a5bb88b89676130271207029df4eaba0dc573 /lib/api/entities.rb
parent223d26405128a64f624b78e7d4b03565d1e85a69 (diff)
parent381638b77f68004dd9b5607eacceb3cee5b2bf3c (diff)
downloadgitlab-ce-6a9aed1e878bc8651243d645d0a9d2f7da33f248.tar.gz
Merge branch 'master' into 6-0-dev
Conflicts: CHANGELOG VERSION app/views/admin/teams/projects/new.html.haml app/views/projects/teams/available.html.haml doc/install/installation.md
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r--lib/api/entities.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index 14d6c0f9353..7fcc7eba9d2 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -25,6 +25,12 @@ module API
expose :id, :url, :created_at
end
+ class ForkedFromProject < Grape::Entity
+ expose :id
+ expose :name, :name_with_namespace
+ expose :path, :path_with_namespace
+ end
+
class Project < Grape::Entity
expose :id, :description, :default_branch, :public, :ssh_url_to_repo, :http_url_to_repo, :web_url
expose :owner, using: Entities::UserBasic
@@ -32,6 +38,7 @@ module API
expose :path, :path_with_namespace
expose :issues_enabled, :merge_requests_enabled, :wall_enabled, :wiki_enabled, :created_at, :last_activity_at
expose :namespace
+ expose :forked_from_project, using: Entities::ForkedFromProject, :if => lambda{ | project, options | project.forked? }
end
class ProjectMember < UserBasic