hubgrep.lib.hosting_service_interfaces.gitea module

Hosting-service interface and result-class for Gitea.

class hubgrep.lib.hosting_service_interfaces.gitea.GiteaSearch(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 Gitea.

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 = 'Gitea'
class hubgrep.lib.hosting_service_interfaces.gitea.GiteaSearchResult(search_result_item, host_service_id)

Bases: hubgrep.lib.hosting_service_interfaces._hosting_service_interface.SearchResult

Gitea search result - example response from Gitea API: {

“allow_merge_commits”: true, “allow_rebase”: true, “allow_rebase_explicit”: true, “allow_squash_merge”: true, “archived”: true, “avatar_url”: “string”, “clone_url”: “string”, “created_at”: “2020-06-19T14:42:45.957Z”, “default_branch”: “string”, “description”: “string”, “empty”: true, “external_tracker”: {

“external_tracker_format”: “string”, “external_tracker_style”: “string”, “external_tracker_url”: “string”

}, “external_wiki”: {

“external_wiki_url”: “string”

}, “fork”: true, “forks_count”: 0, “full_name”: “string”, “has_issues”: true, “has_pull_requests”: true, “has_wiki”: true, “html_url”: “string”, “id”: 0, “ignore_whitespace_conflicts”: true, “internal”: true, “internal_tracker”: {

“allow_only_contributors_to_track_time”: true, “enable_issue_dependencies”: true, “enable_time_tracker”: true

}, “mirror”: true, “name”: “string”, “open_issues_count”: 0, “open_pr_counter”: 0, “original_url”: “string”, “owner”: {

“avatar_url”: “string”, “created”: “2020-06-19T14:42:45.957Z”, “email”: “user@example.com”, “full_name”: “string”, “id”: 0, “is_admin”: true, “language”: “string”, “last_login”: “2020-06-19T14:42:45.957Z”, “login”: “string”

}, “permissions”: {

“admin”: true, “pull”: true, “push”: true

}, “private”: true, “release_counter”: 0, “size”: 0, “ssh_url”: “string”, “stars_count”: 0, “template”: true, “updated_at”: “2020-06-19T14:42:45.957Z”, “watchers_count”: 0, “website”: “string”

}