octomachinery.github.api.app_client module¶

GitHub App API client.

class octomachinery.github.api.app_client.GitHubApp(config: GitHubAppIntegrationConfig, http_session: ClientSession, event_routers: Iterable[OctomachineryRouterBase] = {<octomachinery.routing.routers.ConcurrentRouter object>})[source]¶

Bases: object

GitHub API wrapper.

property api_client: RawGitHubAPI¶

The GitHub App client with an async CM interface.

async dispatch_event(github_event: GitHubEvent) → Iterable[object][source]¶

Dispatch github_event into the embedded routers.

async get_installation(event)[source]¶

Retrieve an installation creds from store.

async get_installation_by_id(install_id)[source]¶

Retrieve an installation with access tokens via API.

async get_installations()[source]¶

Retrieve all installations with access tokens via API.

property gh_jwt: GitHubJWTToken¶

Generate app’s JSON Web Token, valid for 60 seconds.

async log_installs_list() → None[source]¶

Store all installations data before starting.