How to use the gidgethub.GitHubException function in gidgethub

To help you get started, we’ve selected a few gidgethub 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 sanitizers / octomachinery / octomachinery / github / errors / View on Github external
"""Exceptions collection related to interactions with GitHub."""

import attr
from gidgethub import GitHubException

# pylint: disable=relative-beyond-top-level
from ..models.action_outcomes import ActionOutcome

class GitHubError(GitHubException):
    """Generic GitHub-related error."""

class GitHubActionError(GitHubError):
    """Generic GitHub-related error."""

    _outcome: ActionOutcome

    def terminate_action(self):
        """Terminate current process using corresponding return code."""
github bioconda / bioconda-utils / bioconda_utils / View on Github external
async def iter_pr_commits(self, number: int):
        """Create iterator over commits in a PR"""
        var_data = copy(self.var_default)
        var_data['number'] = str(number)
            async for item in self.api.getiter(self.PULL_COMMITS, var_data):
                yield item
        except gidgethub.GitHubException: