hubgrep.lib.hosting_service_interfaces.gitlab module

Hosting-service interface and result-class for Gitlab.

class hubgrep.lib.hosting_service_interfaces.gitlab.GitLabSearch(host_service_id, api_url, label, config_dict, cached_session, timeout=None)

Bases: hubgrep.lib.hosting_service_interfaces._hosting_service_interface.HostingServiceInterface

Interface for searching via GitLab.

static default_api_url_from_landingpage_url(landingpage_url: str)str

Define a default api_url as derived from a landingpage_url - for autocomplete convenience.

name = 'GitLab'
class hubgrep.lib.hosting_service_interfaces.gitlab.GitLabSearchResult(search_result_item, host_service_id)

Bases: hubgrep.lib.hosting_service_interfaces._hosting_service_interface.SearchResult

GitLab search result - example response from GitLab API: {

“id”: 6, “description”: “Nobis sed ipsam vero quod cupiditate veritatis hic.”, “name”: “Flight”, “name_with_namespace”: “Twitter / Flight”, “path”: “flight”, “path_with_namespace”: “twitter/flight”, “created_at”: “2017-09-05T07:58:01.621Z”, “default_branch”: “master”, “tag_list”:[], “ssh_url_to_repo”: “ssh://jarka@localhost:2222/twitter/flight.git”, “http_url_to_repo”: “http://localhost:3000/twitter/flight.git”, “web_url”: “http://localhost:3000/twitter/flight”, “avatar_url”: null, “star_count”: 0, “forks_count”: 0, “last_activity_at”: “2018-01-31T09:56:30.902Z”

}