summaryrefslogtreecommitdiff
path: root/lib/api/entities.rb
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2017-07-10 14:58:23 -0700
committerStan Hu <stanhu@gmail.com>2017-07-11 06:32:13 -0700
commite17ac5705dd84ede3ae079051adcb66200457338 (patch)
treea7b0000d3dab6c48499bb963e6ec5cfdfeb6e049 /lib/api/entities.rb
parent01dabbd5c94b494a1833c4e0395032cc81f85dce (diff)
downloadgitlab-ce-sh-add-mr-simple-mode.tar.gz
Add a simple mode to merge request APIsh-add-mr-simple-mode
The current "basic" merge request API still loads too much data. For integrations like the Trello Power-up, we just need the basics. Closes #34920
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r--lib/api/entities.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index 945f2821d72..47742a164fc 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -314,6 +314,13 @@ module API
expose :id
end
+ class MergeRequestSimple < ProjectEntity
+ expose :title
+ expose :web_url do |merge_request, options|
+ Gitlab::UrlBuilder.build(merge_request)
+ end
+ end
+
class MergeRequestBasic < ProjectEntity
expose :target_branch, :source_branch
expose :upvotes do |merge_request, options|