octomachinery.github.models package

Module contents

Models representing objects in GitHub API.

class octomachinery.github.models.GitHubAppInstallation(id, app_id, created_at, updated_at, account: dict, events: List[str], permissions: dict, repository_selection, single_file_name: Optional[str], target_id, target_type: str, access_tokens_url, html_url, repositories_url)[source]

Bases: object

Represents a GitHub App installed into a user or an organization profile.

It has its own ID for installation which is a unique combo of an app and a profile (user or org).

access_tokens_url = None

API endpoint to retrieve access token from.

account = None

Target account (org or user) where this GitHub App is installed into.

app_id = None

GitHub App ID.

created_at = None

Date time when the installation has been installed.

events = None

List of webhook events the app will be receiving from the account.

html_url = None

URL for controlling the GitHub App Installation.

id = None

Installation ID.

permissions = None

Permission levels of access to API endpoints types.

repositories_url = None

API endpoint listing repositories accissible by this Installation.

repository_selection = None

Repository selection mode.

single_file_name = None

File path the GitHub app controls.

target_id = None

Target account ID where this GitHub App is installed into.

target_type = None

Target account type where this GitHub App is installed into.

updated_at = None

Date time when the installation was last updated.

class octomachinery.github.models.GitHubInstallationAccessToken(token, expires_at)[source]

Bases: object

Struct for installation access token response from GitHub API.

property expired

Check whether this token has expired already.

expires_at = None

Token expiration time.

token = None

Access token for GitHub App Installation.