summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorToon Claes <toon@iotcl.com>2017-07-28 00:07:28 +0200
committerToon Claes <toon@iotcl.com>2017-07-28 00:07:28 +0200
commitd77088bb0bcb5f77a1337af5bdb30098370f774e (patch)
treedbd445d5c8730cdd3c1484a411fb899707f62b80 /lib
parentd7505de8b3ff5ba9fd939b2e31c75c1a4cdde80f (diff)
downloadgitlab-ce-d77088bb0bcb5f77a1337af5bdb30098370f774e.tar.gz
Default /merge_request API endpoint to `scope=created-by-me`
This matches the behavior of the /issues endpoint.
Diffstat (limited to 'lib')
-rw-r--r--lib/api/merge_requests.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/api/merge_requests.rb b/lib/api/merge_requests.rb
index 3b57959162e..8810d4e441d 100644
--- a/lib/api/merge_requests.rb
+++ b/lib/api/merge_requests.rb
@@ -38,7 +38,7 @@ module API
optional :view, type: String, values: %w[simple], desc: 'If simple, returns the `iid`, URL, title, description, and basic state of merge request'
optional :author_id, type: Integer, desc: 'Return merge requests which are authored by the user with the given ID'
optional :assignee_id, type: Integer, desc: 'Return merge requests which are assigned to the user with the given ID'
- optional :scope, type: String, values: %w[created-by-me assigned-to-me all], default: 'all',
+ optional :scope, type: String, values: %w[created-by-me assigned-to-me all],
desc: 'Return merge requests for the given scope: `created-by-me`, `assigned-to-me` or `all`'
use :pagination
end
@@ -50,6 +50,8 @@ module API
end
params do
use :merge_requests_params
+ optional :scope, type: String, values: %w[created-by-me assigned-to-me all], default: 'created-by-me',
+ desc: 'Return merge requests for the given scope: `created-by-me`, `assigned-to-me` or `all`'
end
get do
merge_requests = find_merge_requests