diff options
author | Angus MacArthur <amacarthur@blackberry.com> | 2013-06-27 17:49:26 -0400 |
---|---|---|
committer | Angus MacArthur <amacarthur@blackberry.com> | 2013-07-08 17:34:00 -0400 |
commit | ea5a006f27cfd3013f94652e0e0f0e63091036ad (patch) | |
tree | af0e150d45b1f9102245595a3a5b14637b5809aa /lib/api/entities.rb | |
parent | 7ebbb6e33f872651c8f92799570d58353a4a08b3 (diff) | |
download | gitlab-ce-ea5a006f27cfd3013f94652e0e0f0e63091036ad.tar.gz |
Additon of apis for fork administration.
Added ability to add and remove the forked from/to relatioinship
between existing repos.
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r-- | lib/api/entities.rb | 7 |
1 files changed, 7 insertions, 0 deletions
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 |