diff options
author | Lee Tickett <lee@tickett.net> | 2019-05-17 06:10:08 +0000 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2019-05-17 06:10:08 +0000 |
commit | a4e9259d8a39c0f1777af025fd7255dafb5d0e44 (patch) | |
tree | dd28b060b855813271073c72894927c82fda1076 /lib | |
parent | f7ebea045b6bb964072617efa5d4370f22badb7d (diff) | |
download | gitlab-ce-a4e9259d8a39c0f1777af025fd7255dafb5d0e44.tar.gz |
#46469 - Added ref querystring parameter to project search to allow searching on branches other than master
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/search.rb | 3 |
1 files changed, 2 insertions, 1 deletions
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 |