From 1c8f500552ceb8184ff0b28646918341fc4822d4 Mon Sep 17 00:00:00 2001 From: Matheus Webler Date: Thu, 2 Aug 2018 23:01:56 -0700 Subject: [PATCH] Fixed projects options for api v4 and updated docs --- lib/gitlab/client/projects.rb | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/gitlab/client/projects.rb b/lib/gitlab/client/projects.rb index 9d7ef2b78..9c062e5cf 100644 --- a/lib/gitlab/client/projects.rb +++ b/lib/gitlab/client/projects.rb @@ -10,14 +10,11 @@ module Projects # @param [Hash] options A customizable set of options. # @option options [Integer] :page The page number. # @option options [Integer] :per_page The number of results per page. - # @option options [String] :scope Scope of projects. 'owned' for list of projects owned by the authenticated user, 'all' to get all projects (admin only) + # (Any provided options will be passed to Gitlab. See {https://docs.gitlab.com/ce/api/projects.html#list-all-projects Gitlab docs} for all valid options) + # # @return [Array] def projects(options={}) - if options[:scope] - get("/projects/#{options[:scope]}", query: options) - else - get("/projects", query: options) - end + get("/projects", query: options) end # Search for projects by name.