Register the Reaudit GitHub App and wire its credentials into a Reaudit instance.
Go to github.com/settings/apps/new (or your organization's equivalent under Settings → Developer settings → GitHub Apps) and fill out the form as follows:
| Field | Value |
|---|---|
| GitHub App name | Reaudit Digital Marketing Fixer (must be globally unique) |
| Description | A short pitch of what the app does. Markdown is supported. |
| Homepage URL | https://your-reaudit-host |
| Callback URL | Leave empty. The user-OAuth flow is not used. |
| Setup URL (optional) | https://your-reaudit-host/api/integrations/github/callback |
| Redirect on update | Unchecked. |
| Webhook → Active | Checked. |
| Webhook URL | https://your-reaudit-host/api/integrations/github/webhook |
| Webhook secret | Run openssl rand -hex 32 and paste the value. Store the same string as GITHUB_APP_WEBHOOK_SECRET. |
| Where can this GitHub App be installed? | Any account. |
npx smee -u https://smee.io/<channel> -t http://localhost:3000/api/integrations/github/webhookRepository permissions (everything else stays at No access):
Subscribe to events:
installation and installation_repositories events are sent to every GitHub App automatically and do not appear in the subscribe list.After clicking Create GitHub App, you land on the app's settings page. Collect these values:
.pem file downloads..pem like a password. Move it into your secret store immediately and delete the local copy. Anyone with this key can act as the app.Reaudit reads these six environment variables. Add them to your .env for local dev and to your secret store for staging or prod:
GITHUB_APP_ID=...
GITHUB_APP_SLUG=reaudit-digital-marketing-fixer
GITHUB_APP_CLIENT_ID=Iv23li...
GITHUB_APP_CLIENT_SECRET=...
GITHUB_APP_WEBHOOK_SECRET=...
GITHUB_APP_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\n...\n-----END RSA PRIVATE KEY-----\n"To convert the downloaded .pem into the single-line form Node needs, run:
awk 'BEGIN{ORS="\\n"} {print}' ~/Downloads/reaudit-*.private-key.pemWrap the output in double quotes and assign it to GITHUB_APP_PRIVATE_KEY.
GITHUB_APP_SLUG must exactly match the slug GitHub assigned to your app (visible in the URL of the app settings page). Reaudit uses it to build the install link.You can rotate any of the secrets without code changes. From the GitHub App settings page:
GITHUB_APP_CLIENT_SECRET, redeploy.GITHUB_APP_WEBHOOK_SECRET, redeploy.GITHUB_APP_PRIVATE_KEY. GitHub allows multiple active keys so you can roll without downtime.On this page