diff options
author | Toon Claes <toon@iotcl.com> | 2017-07-28 00:07:28 +0200 |
---|---|---|
committer | Toon Claes <toon@iotcl.com> | 2017-07-28 00:07:28 +0200 |
commit | d77088bb0bcb5f77a1337af5bdb30098370f774e (patch) | |
tree | dbd445d5c8730cdd3c1484a411fb899707f62b80 /lib/api | |
parent | d7505de8b3ff5ba9fd939b2e31c75c1a4cdde80f (diff) | |
download | gitlab-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/api')
-rw-r--r-- | lib/api/merge_requests.rb | 4 |
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 |