Receives GitHub webhooks and:
webhooks) and acknowledges it with 200 OK.repository event, action: created), automatically adds a configured collaborator to that repository via the GitHub API.The webhook endpoint is live at:
https://github-webhook-collab.val.run/
Set these on the val:
GITHUB_WEBHOOK_SECRET — a high-entropy secret used to verify webhook signatures. Set the same value on GitHub (Step 2). Optional but strongly recommended; without it the endpoint trusts any payload.COLLABORATOR — the GitHub username to add as a collaborator on newly created repositories.GITHUB_TOKEN — a token that can invite collaborators to owners repos. Use a classic PAT with repo admin scope, or a fine-grained PAT granted Administration → Read and write on the relevant repositories.👉 Add GITHUB_WEBHOOK_SECRET here: https://www.val.town/x/heidi/github-webhook-collaborator/environment-variables?key=GITHUB_WEBHOOK_SECRET 👉 Add COLLABORATOR here: https://www.val.town/x/heidi/github-webhook-collaborator/environment-variables?key=COLLABORATOR 👉 Add GITHUB_TOKEN here: https://www.val.town/x/heidi/github-webhook-collaborator/environment-variables?key=GITHUB_TOKEN
application/json.GITHUB_WEBHOOK_SECRET value.repository webhook). For broader logging of all events, select "Send me everything".repository + created events trigger the collaborator invite. The collaborator is granted write permission.main.ts — HTTP handler: verifies signature, stores the event, routes the repository-created case.db.ts — SQLite schema and insert helper.github.ts — calls the GitHub API to add a collaborator.