octomachinery.github.models package

Module contents

Models representing objects in GitHub API.

class octomachinery.github.models.GitHubAppInstallation(id, app_id, app_slug, created_at, updated_at, account: Dict[str, Any], events: List[str], permissions: Dict[str, Any], 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: str = None

API endpoint to retrieve access token from.

account: typing.Dict[str, typing.Any] = None

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

app_id: int = None

GitHub App ID.

app_slug: str = None

GitHub App slug.

created_at: datetime = None

Date time when the installation has been installed.

events: typing.List[str] = None

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

html_url: str = None

URL for controlling the GitHub App Installation.

id: int = None

Installation ID.

permissions: typing.Dict[str, typing.Any] = None

Permission levels of access to API endpoints types.

repositories_url: str = None

API endpoint listing repositories accissible by this Installation.

repository_selection: str = None

Repository selection mode.

single_file_name: typing.Optional[str] = None

File path the GitHub app controls.

target_id: int = None

Target account ID where this GitHub App is installed into.

target_type: str = None

Target account type where this GitHub App is installed into.

updated_at: datetime = None

Date time when the installation was last updated.

class octomachinery.github.models.GitHubInstallationAccessToken(token, expires_at, permissions: Dict[str, str], repository_selection, repositories=[])[source]

Bases: object

Struct for installation access token response from GitHub API.

property expired

Check whether this token has expired already.

expires_at: datetime = None

Token expiration time.

permissions: typing.Dict[str, str] = None

Permission levels of access to API endpoints types.

repositories: typing.List[typing.Dict[str, typing.Any]] = None

List of accessible repositories.

repository_selection: str = None

Repository selection mode.

token: SecretStr = None

Access token for GitHub App Installation.