Store repo_url
Set the repository URL in app config so the agent knows which app owns that repo.
Relay does not need a hosted Git provider abstraction. The agent stores the repo URL for an app, GitHub posts push events to the agent, and Relay decides which app/env/branch should deploy.
POST http://<agent-host>:8080/api/webhooks/github
Content-Type: application/json
X-Hub-Signature-256: sha256=...The agent reads the repository URL and branch from the webhook payload, then checks app_state rows to find the app/env/branch that should deploy. If there is a per-app webhook secret, it is used first.
Set the repository URL in app config so the agent knows which app owns that repo.
Point GitHub at `/api/webhooks/github` on the Relay agent.
Relay checks the per-app secret when present, otherwise the global fallback secret.
A matching push triggers the same build and rollout path as a manual deploy.
Relay stores repository metadata per app/env/branch. That lets the webhook handler know where a push should go and gives the dashboard enough information to display repository details.
The Git remote used to match incoming webhooks.
The branch this app slot should deploy from.
Usually preview or prod, but stored explicitly.
Optional per-app secret used instead of the global fallback.
{
"app": "demo",
"env": "preview",
"branch": "main",
"repo_url": "https://github.com/org/repo.git",
"webhook_secret": "super-secret"
}Per-app secrets make it easier to isolate repositories and rotate one integration at a time. The global RELAY_GITHUB_WEBHOOK_SECRET still works as a fallback, but it should not be your only control if multiple repos share the same agent.
Expose the webhook endpoint only on the agent you intend GitHub to reach.
Set an explicit webhook secret in the project settings or app config.
Keep the general Relay API token separate from GitHub webhook auth.
Use HTTPS and a stable hostname if the agent is reachable from the public internet.
URL: http://<agent-host>:8080/api/webhooks/github
Content type: application/json
Secret: <per-app-secret>
Events: push