From ea5a006f27cfd3013f94652e0e0f0e63091036ad Mon Sep 17 00:00:00 2001 From: Angus MacArthur Date: Thu, 27 Jun 2013 17:49:26 -0400 Subject: Additon of apis for fork administration. Added ability to add and remove the forked from/to relatioinship between existing repos. --- lib/api/entities.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/api/entities.rb') diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 0d8cac5c8fd..dea5771d6b6 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 -- cgit v1.2.1