Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use gitlab search criteria

Tags:

git

gitlab

In gitlab's doc, there is list projects API, however I wonder how to use the search field.

I've tried with http://GITLAB_API/projects?search=QUERY&private_token=xxx, and it successfully returned projects those contain QUERY in their names, but I want to know if there is advanced search criteria available? For example, I want to get projects under certain namespace, is it possible to filter those projects through this api? Or any api else?

Thank you!

like image 499
Dickeylth Avatar asked Aug 05 '15 02:08

Dickeylth


People also ask

Can you search code in GitLab?

Advanced Search is based on Elasticsearch, a purpose-built full-text search engine you can horizontally scale to get results in up to a second in most cases. You can find code you want to update in all projects at once to save maintenance time and promote innersourcing. You can use Advanced Search in: Projects.

Which visibility levels are available in GitLab?

GitLab allows users with the Owner role to set a project's or group's visibility as: Public. Internal. Private.


1 Answers

It appears to search for projects that have a name, path, namespace, or description that match your query string. Sadly, it doesn't appear to be anything fancier.

Tracing the source code of 8.3 stable: lib/api/projects.rb calls a filter_projects helper in lib/api/helpers.rb which calls search in app/models/project.rb.

like image 123
Patrick Avatar answered Sep 22 '22 14:09

Patrick