octomachinery.app.runtime.installation_utils module#

Utility helpers for App/Action installations.

async octomachinery.app.runtime.installation_utils.get_installation_config(*, config_name: str = 'config.yml', ref: Optional[str] = None) Mapping[str, Any][source]#

Get a config object from the current installation.

Read from file system checkout in case of GitHub Action env. Grab it via GitHub API otherwise.

Usage:

>>> from octomachinery.app.runtime.installation_utils import (
...     get_installation_config
... )
>>> await get_installation_config()
async octomachinery.app.runtime.installation_utils.read_file_contents_from_repo(*, file_path: str, ref: Optional[str] = None) Optional[str][source]#

Get a config object from the current installation.

Read from file system checkout in case of GitHub Action env. Grab it via GitHub API otherwise.

Usage:

>>> from octomachinery.app.runtime.installation_utils import (
...     read_file_contents_from_repo
... )
>>> await read_file_contents_from_repo(
...     '/file/path.txt',
...     ref='bdeaf38',
... )