ghia package¶
Submodules¶
ghia.cli module¶
ghia.common module¶
-
class
ghia.common.GHIA(token, rules, fallback_label, dry_run, ghia_strategy, is_async=False)[source]¶ Bases:
object-
DEFAULT_STRATEGY= 'append'¶
-
ENVVAR_CONFIG= 'GHIA_CONFIG'¶
-
ENVVAR_DRYRUN= 'GHIA_DRYRUN'¶
-
ENVVAR_STRATEGY= 'GHIA_STRATEGY'¶
-
MATCHERS= {'any': <function _match_any>, 'label': <function _match_label>, 'text': <function _match_text>, 'title': <function _match_title>}¶
-
STRATEGIES= {'append': <function _strategy_append>, 'change': <function _strategy_change>, 'set': <function _strategy_set>}¶
-
-
ghia.common.get_rules(ctx, param, config_rules)[source]¶ Extract labels from labels config and do the checks config_rules: ConfigParser with loaded configuration of labels
ghia.github module¶
-
class
ghia.github.GitHub(token, session=None, is_async=False)[source]¶ Bases:
objectThis class can communicate with the GitHub API just give it a token and go.
-
API= 'https://api.github.com'¶
-
issues(owner, repo, state='open', assignee=None)[source]¶ Get issues of a repo owner: GitHub user or org repo: repo name state: open, closed, all (default open) assignee: optional filter for assignees (None, “none”, “<username>”, or “*”)
-
set_issue_assignees(owner, repo, number, assignees)[source]¶ Sets assignees for the issue. Replaces all existing assignees. owner: GitHub user or org repo: repo name number: issue id assignees: list of usernames (as strings)
-
set_issue_assignees_async(owner, repo, number, assignees)[source]¶ Sets assignees for the issue. Replaces all existing assignees. owner: GitHub user or org repo: repo name number: issue id assignees: list of usernames (as strings)
-
set_issue_labels(owner, repo, number, labels)[source]¶ Sets labels for the issue. Replaces all existing labels. owner: GitHub user or org repo: repo name number: issue id labels: list of labels (as strings)
-
ghia.web module¶
-
ghia.web.process_webhook_issues(payload)[source]¶ Process webhook event “issue” payload: event payload
-
ghia.web.webhook_verify_signature(payload, signature, secret, encoding='utf-8')[source]¶ Verify the payload with given signature against given secret see https://developer.github.com/webhooks/securing/ payload: received data as dict signature: included SHA1 signature of payload (with secret) secret: secret to verify signature encoding: encoding for secret (optional)