Module: Gitlab::Client::Search
- Included in:
- Gitlab::Client
- Defined in:
- lib/gitlab/client/search.rb
Overview
Defines methods related to global searches, searching in projects and searching in groups.
Instance Method Summary collapse
-
#search_globally(scope, search) ⇒ Array<Gitlab::ObjectifiedHash>
Search globally across the GitLab instance.
-
#search_in_group(group, scope, search) ⇒ Array<Gitlab::ObjectifiedHash>
Search within the specified group.
-
#search_in_project(project, scope, search, ref = nil) ⇒ Array<Gitlab::ObjectifiedHash>
Search within the specified project.
Instance Method Details
#search_globally(scope, search) ⇒ Array<Gitlab::ObjectifiedHash>
Search globally across the GitLab instance.
20 21 22 23 |
# File 'lib/gitlab/client/search.rb', line 20 def search_globally(scope, search) = { scope: scope, search: search } get('/search', query: ) end |
#search_in_group(group, scope, search) ⇒ Array<Gitlab::ObjectifiedHash>
Search within the specified group.
37 38 39 40 |
# File 'lib/gitlab/client/search.rb', line 37 def search_in_group(group, scope, search) = { scope: scope, search: search } get("/groups/#{url_encode group}/search", query: ) end |
#search_in_project(project, scope, search, ref = nil) ⇒ Array<Gitlab::ObjectifiedHash>
Search within the specified project.
57 58 59 60 61 62 63 64 |
# File 'lib/gitlab/client/search.rb', line 57 def search_in_project(project, scope, search, ref = nil) = { scope: scope, search: search } # Add ref filter if provided - backward compatible with main project [:ref] = ref unless ref.nil? get("/projects/#{url_encode project}/search", query: ) end |