Connecting a repo lets KnightLeap react to what happens in it — pushes and
pull requests — without installing a GitHub App or granting anyone access to your
code. You add one webhook in the repo's own settings, pointed at a URL KnightLeap gives you and
signed with a secret only your account knows. That's the whole setup.
One secret, any number of repos. Your account has a single webhook secret. Every
project gets its own webhook URL (the URL is what tells KnightLeap which project an event belongs
to), but you reuse the same secret for all of them — connect one repo or fifty, nothing new to
generate each time.
1. Get your URL and secret
In KnightLeap, open Settings → GitHub webhooks. Generate a secret if you
haven't already — it's shown once, so copy it now — and find the URL for the project you want
this repo to feed. It looks like:
In the repo on GitHub, go to Settings → Webhooks → Add webhook, then:
Payload URL: paste the project's URL from KnightLeap.
Content type:application/json.
Secret: paste your account's webhook secret.
Which events would you like to trigger this webhook? choose
“Let me select individual events”, then check only
Pushes and Pull requests.
Make sure Active is checked, then click Add webhook.
GitHub sends a test ping event immediately after you save.
You should see a green checkmark next to the webhook in GitHub's recent-deliveries list — that's
confirmation the URL and secret both work.
Connecting more repos
Repeat step 2 in each additional repo's settings. The payload URL changes per project (copy the
right one from Settings → GitHub webhooks); the secret stays the same
account-wide.
Lost the secret, or think it leaked? Rotate it from
Settings → GitHub webhooks. The old one stops working immediately, so update
every repo's webhook with the new value afterward.