octomachinery.github.config.app module

Config schema for a GitHub App instance details.

class octomachinery.github.config.app.GitHubAppIntegrationConfig(app_id=None, private_key=None, private_key_fingerprint=None, webhook_secret=None, app_name=None, app_version=None, app_url=None)[source]

Bases: object

GitHub App auth related config.

app_id
app_name
app_url
app_version
classmethod from_environ(environ=environ({'HOSTNAME': 'build-10455813-project-386025-octomachinery', 'PYPY_VERSION_35': 'pypy3.5-7.0.0', 'APPDIR': '/app', 'HOME': '/home/docs', 'OLDPWD': '/', 'CONDA_VERSION': '4.6.14', 'READTHEDOCS': 'True', 'READTHEDOCS_PROJECT': 'octomachinery', 'PATH': '/home/docs/checkouts/readthedocs.org/user_builds/octomachinery/envs/latest/bin:/home/docs/.pyenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/docs/.conda/bin:/home/docs/.pyenv/bin', 'LANG': 'C.UTF-8', 'READTHEDOCS_LANGUAGE': 'en', 'DEBIAN_FRONTEND': 'noninteractive', 'PYTHON_VERSION_35': '3.5.7', 'PYTHON_VERSION_27': '2.7.16', 'PYTHON_VERSION_36': '3.6.8', 'READTHEDOCS_VERSION': 'latest', 'PWD': '/home/docs/checkouts/readthedocs.org/user_builds/octomachinery/checkouts/latest/docs', 'PYTHON_VERSION_37': '3.7.3', 'PYENV_ROOT': '/home/docs/.pyenv', 'DOCUTILSCONFIG': '/home/docs/checkouts/readthedocs.org/user_builds/octomachinery/checkouts/latest/docs/docutils.conf', 'READTHEDOCS_EXEC': 'True'}))
classmethod generate_help(**kwargs)
private_key
private_key_fingerprint
property user_agent

The User-Agent value to use when hitting GitHub API.

webhook_secret
octomachinery.github.config.app.validate_fingerprint_if_present(instance, _attribute, value)[source]

Validate that the private key matches the fingerprint pin.

Raises

ValueError – if the fingerprint pin is present but doesn’t match the private key

octomachinery.github.config.app.validate_is_not_none_if_app(self, attr, value)[source]

Forbid None value in a GitHub App context.