From a4e9259d8a39c0f1777af025fd7255dafb5d0e44 Mon Sep 17 00:00:00 2001 From: Lee Tickett Date: Fri, 17 May 2019 06:10:08 +0000 Subject: #46469 - Added ref querystring parameter to project search to allow searching on branches other than master --- lib/api/search.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/api/search.rb b/lib/api/search.rb index 60095300ea1..1cab1a97186 100644 --- a/lib/api/search.rb +++ b/lib/api/search.rb @@ -112,12 +112,13 @@ module API type: String, desc: 'The scope of the search', values: Helpers::SearchHelpers.project_search_scopes + optional :ref, type: String, desc: 'The name of a repository branch or tag. If not given, the default branch is used' use :pagination end get ':id/(-/)search' do check_users_search_allowed! - present search(project_id: user_project.id), with: entity + present search({ project_id: user_project.id, repository_ref: params[:ref] }), with: entity end end end -- cgit v1.2.3