Commit 9651457260ea1b9e0e458ed0afd3fed0a8991648
Exists in
master
and in
4 other branches
Merge branch 'mr_votes_api' of /home/git/repositories/gitlab/gitlabhq
Showing
2 changed files
with
9 additions
and
1 deletions
Show diff stats
doc/api/merge_requests.md
@@ -20,6 +20,8 @@ Parameters: | @@ -20,6 +20,8 @@ Parameters: | ||
20 | "project_id":3, | 20 | "project_id":3, |
21 | "title":"test1", | 21 | "title":"test1", |
22 | "state":"opened", | 22 | "state":"opened", |
23 | + "upvotes":0, | ||
24 | + "downvotes":0, | ||
23 | "author":{ | 25 | "author":{ |
24 | "id":1, | 26 | "id":1, |
25 | "username": "admin", | 27 | "username": "admin", |
@@ -62,6 +64,8 @@ Parameters: | @@ -62,6 +64,8 @@ Parameters: | ||
62 | "project_id":3, | 64 | "project_id":3, |
63 | "title":"test1", | 65 | "title":"test1", |
64 | "state":"merged", | 66 | "state":"merged", |
67 | + "upvotes":0, | ||
68 | + "downvotes":0, | ||
65 | "author":{ | 69 | "author":{ |
66 | "id":1, | 70 | "id":1, |
67 | "username": "admin", | 71 | "username": "admin", |
@@ -106,6 +110,8 @@ Parameters: | @@ -106,6 +110,8 @@ Parameters: | ||
106 | "project_id":3, | 110 | "project_id":3, |
107 | "title":"test1", | 111 | "title":"test1", |
108 | "state":"opened", | 112 | "state":"opened", |
113 | + "upvotes":0, | ||
114 | + "downvotes":0, | ||
109 | "author":{ | 115 | "author":{ |
110 | "id":1, | 116 | "id":1, |
111 | "username": "admin", | 117 | "username": "admin", |
@@ -152,6 +158,8 @@ Parameters: | @@ -152,6 +158,8 @@ Parameters: | ||
152 | "project_id":3, | 158 | "project_id":3, |
153 | "title":"test1", | 159 | "title":"test1", |
154 | "state":"opened", | 160 | "state":"opened", |
161 | + "upvotes":0, | ||
162 | + "downvotes":0, | ||
155 | "author":{ | 163 | "author":{ |
156 | "id":1, | 164 | "id":1, |
157 | "username": "admin", | 165 | "username": "admin", |
lib/api/entities.rb
@@ -112,7 +112,7 @@ module API | @@ -112,7 +112,7 @@ module API | ||
112 | end | 112 | end |
113 | 113 | ||
114 | class MergeRequest < Grape::Entity | 114 | class MergeRequest < Grape::Entity |
115 | - expose :id, :target_branch, :source_branch, :title, :state | 115 | + expose :id, :target_branch, :source_branch, :title, :state, :upvotes, :downvotes |
116 | expose :target_project_id, as: :project_id | 116 | expose :target_project_id, as: :project_id |
117 | expose :author, :assignee, using: Entities::UserBasic | 117 | expose :author, :assignee, using: Entities::UserBasic |
118 | end | 118 | end |