diff options
| author | Robert Speicher <robert@gitlab.com> | 2015-11-22 03:45:15 +0000 | 
|---|---|---|
| committer | Robert Speicher <robert@gitlab.com> | 2015-11-22 03:45:15 +0000 | 
| commit | b166ee6b1d6113642388bd5dc1b95fb53fc69d7b (patch) | |
| tree | 26a332bf4fddaa5ba6f02b1268d9689df9b85154 /lib/api | |
| parent | 9155c82fdc075b7a3ef7f45224cbe5382c2ec7f9 (diff) | |
| parent | 26b12e2c374c8f07abda06a8b19bd116448325f4 (diff) | |
| download | gitlab-ce-b166ee6b1d6113642388bd5dc1b95fb53fc69d7b.tar.gz | |
Merge branch 'fix-award-emoji-api' into 'master'
Add upvote/downvote fields to merge request and note API to preserve compatibility
As discussed in !1825 we should not break the API compatibility.
* This MR adds the fields `upvotes`/`downvotes` to the merge request API again, which always return `0`.
* Add the fields `upvote`/`downvote` to the notes API, which always return `false`
This behavior is documented in the API docs.
See merge request !1867
Diffstat (limited to 'lib/api')
| -rw-r--r-- | lib/api/entities.rb | 5 | 
1 files changed, 5 insertions, 0 deletions
| diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 5dea74db295..9f337bc3cc6 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -163,6 +163,8 @@ module API      class MergeRequest < ProjectEntity        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 @@ -192,6 +194,9 @@ module API        expose :author, using: Entities::UserBasic        expose :created_at        expose :system?, as: :system +      # upvote? and downvote? are deprecated, always return false +      expose :upvote?, as: :upvote +      expose :downvote?, as: :downvote      end      class MRNote < Grape::Entity | 
