How to use the aiogithubapi.AIOGitHubRatelimit function in aiogithubapi

To help you get started, we’ve selected a few aiogithubapi examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DavidFW1960 / home-assistant / custom_components / hacs / hacsbase / __init__.py View on Github external
blacklist = await self.data_repo.get_contents("blacklist")
        repositories = await self.get_repositories()

        for item in json.loads(blacklist.content):
            if item not in self.common.blacklist:
                self.common.blacklist.append(item)

        for category in repositories:
            for repo in repositories[category]:
                if repo in self.common.blacklist:
                    continue
                if self.is_known(repo):
                    continue
                try:
                    await self.register_repository(repo, category)
                except (AIOGitHubException, AIOGitHubRatelimit):
                    pass
github to4ko / myconfig / custom_components / hacs / setup.py View on Github external
try:
        repository = hacs().get_by_name("hacs/integration")
        if repository is None:
            await hacs().register_repository("hacs/integration", "integration")
            repository = hacs().get_by_name("hacs/integration")
        if repository is None:
            raise AIOGitHubException("Unknown error")
        repository.status.installed = True
        repository.versions.installed = VERSION
        repository.status.new = False
        hacs.repo = repository.repository_object
        hacs.data_repo = await hacs().github.get_repo("hacs/default")
    except (
        AIOGitHubException,
        AIOGitHubRatelimit,
        AIOGitHubAuthentication,
    ) as exception:
        hacs.logger.critical(f"[{exception}] - Could not load HACS!")
        return False
    return True
github aneisch / home-assistant-config / custom_components / hacs / setup.py View on Github external
"""Load HACS repositroy."""
    try:
        repository = hacs().get_by_name("hacs/integration")
        if repository is None:
            await hacs().register_repository("hacs/integration", "integration")
            repository = hacs().get_by_name("hacs/integration")
        if repository is None:
            raise AIOGitHubException("Unknown error")
        repository.status.installed = True
        repository.versions.installed = VERSION
        repository.status.new = False
        hacs.repo = repository.repository_object
        hacs.data_repo = await hacs().github.get_repo("hacs/default")
    except (
        AIOGitHubException,
        AIOGitHubRatelimit,
        AIOGitHubAuthentication,
    ) as exception:
        hacs.logger.critical(f"[{exception}] - Could not load HACS!")
        return False
    return True
github DavidFW1960 / home-assistant / custom_components / hacs / setup.py View on Github external
try:
        repository = hacs().get_by_name("hacs/integration")
        if repository is None:
            await hacs().register_repository("hacs/integration", "integration")
            repository = hacs().get_by_name("hacs/integration")
        if repository is None:
            raise AIOGitHubException("Unknown error")
        repository.status.installed = True
        repository.versions.installed = VERSION
        repository.status.new = False
        hacs.repo = repository.repository_object
        hacs.data_repo = await hacs().github.get_repo("hacs/default")
    except (
        AIOGitHubException,
        AIOGitHubRatelimit,
        AIOGitHubAuthentication,
    ) as exception:
        hacs.logger.critical(f"[{exception}] - Could not load HACS!")
        return False
    return True