diff --git a/org_status/org_hosts/gitlab.py b/org_status/org_hosts/gitlab.py index 7aafb01..b6289d2 100644 --- a/org_status/org_hosts/gitlab.py +++ b/org_status/org_hosts/gitlab.py @@ -1,3 +1,6 @@ +import json + +import requests from IGitt.GitLab.GitLab import GitLabPrivateToken from IGitt.GitLab.GitLabOrganization import GitLabOrganization @@ -18,6 +21,13 @@ def __init__(self, token, group, **kargs): self._status_provider = self.StatusProvider(self._group) + @classmethod + def get_host_status(cls): + status = requests.get( + 'https://api.status.io/1.0/status/5b36dc6502d06804c08349f7') + status = json.loads(status.text) + return status['result']['status_overall']['status'] == 'Operational' + def process_repository(self, repo, branch='master'): self.print_status(repo.web_url)