diff options
author | Sebastian Ziebell <sebastian.ziebell@asquera.de> | 2013-02-08 10:32:42 +0100 |
---|---|---|
committer | Sebastian Ziebell <sebastian.ziebell@asquera.de> | 2013-02-08 10:32:42 +0100 |
commit | 8045a81bcf5822f1992442750e1484a93c368229 (patch) | |
tree | 94ce2b257f3ba002ac1a0fde70b69b622304810d /lib/api/entities.rb | |
parent | 5d8a99f10429168e6471fdd1843f5045a10a84b3 (diff) | |
parent | 2f0a75ab77af430f682d67aa9bb865007d832795 (diff) | |
download | gitlab-ce-8045a81bcf5822f1992442750e1484a93c368229.tar.gz |
Merge branch 'master' into fixes/api
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r-- | lib/api/entities.rb | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 80e2954a344..c1873d87b55 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -2,7 +2,7 @@ module Gitlab module Entities class User < Grape::Entity expose :id, :username, :email, :name, :bio, :skype, :linkedin, :twitter, - :dark_scheme, :theme_id, :blocked, :created_at + :dark_scheme, :theme_id, :blocked, :created_at, :extern_uid, :provider end class UserBasic < Grape::Entity @@ -21,6 +21,7 @@ module Gitlab expose :id, :name, :description, :default_branch expose :owner, using: Entities::UserBasic expose :private_flag, as: :private + expose :path, :path_with_namespace expose :issues_enabled, :merge_requests_enabled, :wall_enabled, :wiki_enabled, :created_at expose :namespace end @@ -31,8 +32,22 @@ module Gitlab end end + class Group < Grape::Entity + expose :id, :name, :path, :owner_id + end + + class GroupDetail < Group + expose :projects, using: Entities::Project + end + + class RepoObject < Grape::Entity expose :name, :commit + expose :protected do |repo, options| + if options[:project] + options[:project].protected_branch? repo.name + end + end end class RepoCommit < Grape::Entity |