Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobert Schilling <rschilling@student.tugraz.at>2015-11-21 23:36:31 +0300
committerRobert Schilling <rschilling@student.tugraz.at>2015-11-21 23:36:31 +0300
commit26b12e2c374c8f07abda06a8b19bd116448325f4 (patch)
tree123d044cbb8c7a3f2bebdddcc859f79eada5c6e8 /lib
parent319808fc7be2886224541209eeae153d85386bd0 (diff)
Add upvote/downvote fields to merge request and note API to preserve compatibility
Diffstat (limited to 'lib')
-rw-r--r--lib/api/entities.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index 3da6bc415d6..7f9dba4b6a5 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