Overview
This guide is for operators running self-hosted Mistle. Use this guide to:- Create and configure a GitHub App for connect + webhook flows.
- Add a GitHub provider instance to Mistle runtime config.
Prerequisites
Before configuring Mistle, create a new GitHub App dedicated to Mistle and collect:- App ID
- App slug
- App private key (PEM)
- Webhook secret
- GitHub base URL:
Create the GitHub App
Create a new GitHub App from your account or organization settings:github.com with your GHES base URL.
Configure these values:
- GitHub App name (eg.
Mistle GitHub App) - Homepage URL - Any valid URL for your organization
- Callback URL - Not necessary. Omit.
- Set Post installation Setup URL and Webhook URL:
- For Setup URL, leave
Redirect on updateas unchecked. - For Webhook URL, ensure
Activeis checked.
- For Setup URL, leave
-
Webhook secret - Must match
webhook_secretin Mistle runtime config. -
Permissions - consider the following permissions in Repository Permissions:
Permission Access Enables Actions Read and write - Trigger runs.
- Rerun/cancel runs.
- Inspect workflow runs and artifacts.Checks Read-only - Read check runs. Contents Read and write - Clone/fetch repos.
- Branch, commit, push.
- Open PRs from branches.
- Create releases/tags.Issues Read and write - Create issues.
- Update issues.
- Comment on issues.Metadata Read-only - List repos.
- Read basic repo context.Pull requests Read and write - Open/update PRs.
- Request reviewers.
- Comment/review PRs.
- Merge PRs (repo rules apply). - For Subscribe to events, enable the events you want Mistle to take action on. This can be changed later.
- Private key - Generate and download a PEM private key from GitHub App settings.
-
App ID and App slug - Copy both into Mistle runtime config (
app_id,app_slug).
app_slug must be the actual GitHub App slug (for example from the app URL/settings), not a display-name guess.
Mistle uses the GitHub App installation flow and relies on installation context (installation_id) delivered to the Setup URL callback route. It does not require user OAuth token exchange or device-flow-based user authorization for this provider setup, so the Callback URL field can be left unset.
If you are testing this locally, use a public tunnel (eg. ngrok) to allow GitHub to reach your control-plane callback/webhook URLs.
Configure the GitHub App Setup URL and Webhook URL to the public control-plane endpoint.
Configure Mistle Runtime
Add a provider instance under control-plane config:GitHub.com vs GHES
Behavior is determined by runtime config:- If
api_base_urlis provided, it is used directly. - If
web_base_urlishttps://github.com, provider uses GitHub.com defaults. - Otherwise, provider derives enterprise-style API base from
web_base_url.