Skip to content

Use GitHub App manifests to symplify your GitHub App registration flow

Clicking through the GitHub UI interface to register a GitHub App with the correct permissions and settings is tedious, and error-prone.

I recently discovered that you can automate all this with GitHub App manifests, which contain all the required details about your app. You can then submit it to GitHub and dynamically exchange the manifest with the App ID, Webhook Secret, and Private key.

On the client front, you simply need a way to POST the manifest to GitHub, using a state parameter that you generate:

<form action="" method="post">
Register a GitHub App Manifest: <input type="text" name="manifest" id="manifest"><br>
<input type="submit" value="Submit">
input = document.getElementById("manifest")
input.value = JSON.stringify({
"name": "Octoapp",
"url": "",
"hook_attributes": {
"url": "",
"redirect_url": "",
"callback_urls": [
"public": true,
"default_permissions": {
"issues": "write",
"checks": "write"
"default_events": [

Upon submission, GitHub will redirect back to your site with a temporary code, that you can then exchange for the app secrets.

For RunsOn GitHub Action runners, I am using this feature so that you only need 2 clicks after installation to get your private RunsOn app registered into your own GitHub organization with all the correct settings.

With Probot, you can describe your GitHub App manifest in YAML, so this would look like:

# The list of events the GitHub App subscribes to.
- workflow_job
- meta
# required for registering runners
administration: write
# required to access config file
single_file: write
# required to access collaborators and repository metadata
metadata: read
# Organization members and teams.
members: read
# required to access workflow runs
actions: read
- ./.github/runs-on.yml
name: runs-on
# Set to true when your GitHub App is available to the public or false when it is only accessible to the owner of the app.
public: false

For more details, you can have a look at the Probot doc about this.