2019-02-27 11:51:20 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module API
|
|
|
|
module Helpers
|
|
|
|
module SearchHelpers
|
|
|
|
def self.global_search_scopes
|
|
|
|
# This is a separate method so that EE can redefine it.
|
2020-04-28 14:09:35 -04:00
|
|
|
%w(projects issues merge_requests milestones snippet_titles users)
|
2019-02-27 11:51:20 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def self.group_search_scopes
|
|
|
|
# This is a separate method so that EE can redefine it.
|
2018-09-17 08:54:32 -04:00
|
|
|
%w(projects issues merge_requests milestones users)
|
2019-02-27 11:51:20 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def self.project_search_scopes
|
|
|
|
# This is a separate method so that EE can redefine it.
|
2018-09-17 08:54:32 -04:00
|
|
|
%w(issues merge_requests milestones notes wiki_blobs commits blobs users)
|
2019-02-27 11:51:20 -05:00
|
|
|
end
|
2020-09-14 23:09:24 -04:00
|
|
|
|
|
|
|
def self.search_states
|
|
|
|
%w(all opened closed merged)
|
|
|
|
end
|
2019-02-27 11:51:20 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2019-09-13 09:26:31 -04:00
|
|
|
|
|
|
|
API::Helpers::SearchHelpers.prepend_if_ee('EE::API::Helpers::SearchHelpers')
|