diff options
-rw-r--r-- | docs/gl_objects/search.rst | 40 | ||||
-rw-r--r-- | gitlab/const.py | 1 |
2 files changed, 40 insertions, 1 deletions
diff --git a/docs/gl_objects/search.rst b/docs/gl_objects/search.rst index 750bbe0..e7ba5d7 100644 --- a/docs/gl_objects/search.rst +++ b/docs/gl_objects/search.rst @@ -4,7 +4,45 @@ Search API You can search for resources at the top level, in a project or in a group. Searches are based on a scope (issues, merge requests, and so on) and a search -string. +string. The following constants are provided to represent the possible scopes: + + +* global scopes: + + + ``gitlab.SEARCH_SCOPE_GLOBAL_PROJECTS``: ``projects`` + + ``gitlab.SEARCH_SCOPE_GLOBAL_ISSUES``: ``issues`` + + ``gitlab.SEARCH_SCOPE_GLOBAL_MERGE_REQUESTS``: ``merge_requests`` + + ``gitlab.SEARCH_SCOPE_GLOBAL_MILESTONES``: ``milestones`` + + ``gitlab.SEARCH_SCOPE_GLOBAL_SNIPPET_TITLES``: ``snippet_titles`` + + ``gitlab.SEARCH_SCOPE_GLOBAL_WIKI_BLOBS``: ``wiki_blobs`` + + ``gitlab.SEARCH_SCOPE_GLOBAL_COMMITS``: ``commits`` + + ``gitlab.SEARCH_SCOPE_GLOBAL_BLOBS``: ``blobs`` + + ``gitlab.SEARCH_SCOPE_GLOBAL_USERS``: ``users`` + + +* group scopes: + + + ``gitlab.SEARCH_SCOPE_GROUP_PROJECTS``: ``projects`` + + ``gitlab.SEARCH_SCOPE_GROUP_ISSUES``: ``issues`` + + ``gitlab.SEARCH_SCOPE_GROUP_MERGE_REQUESTS``: ``merge_requests`` + + ``gitlab.SEARCH_SCOPE_GROUP_MILESTONES``: ``milestones`` + + ``gitlab.SEARCH_SCOPE_GROUP_WIKI_BLOBS``: ``wiki_blobs`` + + ``gitlab.SEARCH_SCOPE_GROUP_COMMITS``: ``commits`` + + ``gitlab.SEARCH_SCOPE_GROUP_BLOBS``: ``blobs`` + + ``gitlab.SEARCH_SCOPE_GROUP_USERS``: ``users`` + + +* project scopes: + + + ``gitlab.SEARCH_SCOPE_PROJECT_ISSUES``: ``issues`` + + ``gitlab.SEARCH_SCOPE_PROJECT_MERGE_REQUESTS``: ``merge_requests`` + + ``gitlab.SEARCH_SCOPE_PROJECT_MILESTONES``: ``milestones`` + + ``gitlab.SEARCH_SCOPE_PROJECT_NOTES``: ``notes`` + + ``gitlab.SEARCH_SCOPE_PROJECT_WIKI_BLOBS``: ``wiki_blobs`` + + ``gitlab.SEARCH_SCOPE_PROJECT_COMMITS``: ``commits`` + + ``gitlab.SEARCH_SCOPE_PROJECT_BLOBS``: ``blobs`` + + ``gitlab.SEARCH_SCOPE_PROJECT_USERS``: ``users`` + Reference --------- diff --git a/gitlab/const.py b/gitlab/const.py index 069f0bf..1abad86 100644 --- a/gitlab/const.py +++ b/gitlab/const.py @@ -34,6 +34,7 @@ NOTIFICATION_LEVEL_GLOBAL = "global" NOTIFICATION_LEVEL_MENTION = "mention" NOTIFICATION_LEVEL_CUSTOM = "custom" +# Search scopes _SEARCH_SCOPE_PROJECTS = "projects" _SEARCH_SCOPE_ISSUES = "issues" _SEARCH_SCOPE_MERGE_REQUESTS = "merge_requests" |