Overview
GitHub can be connected in two ways:- API key
- GitHub App installation
Option 1: Connect With An API Key
API key gives access to the GitHub resources available to that token, but it does not support webhook events from GitHub. Create a GitHub personal access token or other API token with the scopes your workflows need, then create the Mistle connection with:| Field | Value |
|---|---|
apiKey | GitHub token |
Option 2: Connect With A GitHub App Installation
GitHub App installation gives access through the installed GitHub App and supports webhook events from GitHub.Create The GitHub App
Create a GitHub App in GitHub.com or GHES. Configure these values:-
GitHub App name (eg.
Mistle GitHub App) - Homepage URL - Any valid URL for your organization
- Callback URL - Not necessary. Omit.
- Webhook secret: create a secret that you will also enter in Mistle
-
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.
Connect It In Mistle
Open Integrations in the dashboard, choose the GitHub target, then select GitHub App installation. Enter:| Field | Value |
|---|---|
app_id | GitHub App ID |
app_slug | GitHub App slug |
appPrivateKeyPem | GitHub App private key PEM |
webhookSecret | Shared webhook secret configured on the GitHub App |
installation_id and setup_action are stored automatically after the installation flow completes. You do not enter those manually.
app_slug must be the actual GitHub App slug from GitHub, not a display name guess.
Copy The URLs From Mistle Into GitHub
After you create the GitHub App connection, open that connection’s detail page in Mistle and copy:Webhook callback URLPost-installation setup URL
- Set the GitHub App’s
Webhook URLto Mistle’sWebhook callback URL. - Set the GitHub App’s
Setup URLto Mistle’sPost-installation setup URL. - Ensure the webhook is active in GitHub.
GitHub Enterprise Server
github-enterprise-server is currently only supported for self-hosted deployments.
It is also not enabled by default in the repository’s example target manifest.