diff options
author | Jarka Kadlecová <jarka@gitlab.com> | 2018-02-13 15:41:35 +0300 |
---|---|---|
committer | Jarka Kadlecová <jarka@gitlab.com> | 2018-02-14 11:00:26 +0300 |
commit | b0b4ae1875529cd7ca786bd5eccd49be9a40a038 (patch) | |
tree | e431498a102e05c4371d5be4e2430b91df01cb16 /lib/gitlab/file_finder.rb | |
parent | bf5e617a10e8df48ff78442f42f2cd6e47f59072 (diff) |
API - Include project in commits&blobs search results
Diffstat (limited to 'lib/gitlab/file_finder.rb')
-rw-r--r-- | lib/gitlab/file_finder.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/gitlab/file_finder.rb b/lib/gitlab/file_finder.rb index 10ffc345bd5..8c082c0c336 100644 --- a/lib/gitlab/file_finder.rb +++ b/lib/gitlab/file_finder.rb @@ -28,7 +28,7 @@ module Gitlab def find_by_content(query) results = repository.search_files_by_content(query, ref).first(BATCH_SIZE) - results.map { |result| Gitlab::ProjectSearchResults.parse_search_result(result) } + results.map { |result| Gitlab::ProjectSearchResults.parse_search_result(result, project) } end def find_by_filename(query, except: []) @@ -45,7 +45,8 @@ module Gitlab basename: File.basename(blob.path), ref: ref, startline: 1, - data: blob.data + data: blob.data, + project: project ) end end |