diff options
author | Zeger-Jan van de Weg <mail@zjvandeweg.nl> | 2015-12-07 10:06:07 +0100 |
---|---|---|
committer | Zeger-Jan van de Weg <mail@zjvandeweg.nl> | 2015-12-07 10:06:07 +0100 |
commit | 0e96d6eb10f92f14d9c06e1728b1a3597a856d2a (patch) | |
tree | e003ee5ba773743fb856f9899b2a2c311139f048 /lib/api/entities.rb | |
parent | 46278ec7ba7c618acaf7381ad466742ce84e33db (diff) | |
parent | 234f4bf20fb338f2164976fd39203fbc671afd29 (diff) | |
download | gitlab-ce-0e96d6eb10f92f14d9c06e1728b1a3597a856d2a.tar.gz |
Merge branch 'master' into merge-if-green
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r-- | lib/api/entities.rb | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 6f9f71b0945..81bf7a8222b 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -162,7 +162,9 @@ module API end class MergeRequest < ProjectEntity - expose :target_branch, :source_branch, :upvotes, :downvotes + expose :target_branch, :source_branch + # deprecated, always returns 0 + expose :upvotes, :downvotes expose :author, :assignee, using: Entities::UserBasic expose :source_project_id, :target_project_id expose :label_names, as: :labels @@ -193,6 +195,8 @@ module API expose :author, using: Entities::UserBasic expose :created_at expose :system?, as: :system + expose :noteable_id, :noteable_type + # upvote? and downvote? are deprecated, always return false expose :upvote?, as: :upvote expose :downvote?, as: :downvote end @@ -222,6 +226,8 @@ module API expose :target_id, :target_type, :author_id expose :data, :target_title expose :created_at + expose :note, using: Entities::Note, if: ->(event, options) { event.note? } + expose :author, using: Entities::UserBasic, if: ->(event, options) { event.author } expose :author_username do |event, options| if event.author @@ -325,7 +331,8 @@ module API end class Release < Grape::Entity - expose :tag, :description + expose :tag, as: :tag_name + expose :description end class RepoTag < Grape::Entity |