GitHub Webhooks
Documentation and guides for OutcomeDev.
GitHub webhooks allow OutcomeDev to automatically respond when pull requests are merged, keeping your tasks in sync without manual updates.
How It Works
When you configure a GitHub webhook for your repository, OutcomeDev will:
- Receive a notification when a pull request is merged
- Find the matching task that was created for that PR
- Automatically mark the task as completed
- Stop any running agents and heartbeat monitors
This means your agents will stop working on a task as soon as the PR is merged, preventing wasted compute on changes that are no longer needed.
Setup
1. Set Your Webhook Secret
The webhook secret is stored in the GITHUB_WEBHOOK_SECRET environment variable on your Vercel deployment.
To generate a secret:
openssl rand -hex 32
To configure in Vercel:
- Go to your Vercel project → Settings → Environment Variables
- Add
GITHUB_WEBHOOK_SECRETwith your generated secret value - Redeploy for the variable to take effect
2. Configure the Webhook in GitHub
For each repository you want to connect:
- Go to your GitHub repository
- Navigate to Settings > Webhooks > Add webhook
- Configure the following:
- Payload URL:
https://your-domain.com/api/webhooks/github - Content type:
application/json - Secret: Your webhook secret from step 1
- Events: Select Pull requests
- Payload URL:
- Click Add webhook
3. Verify the Connection
After adding the webhook, GitHub will send a test ping event. You should see a task marked as completed in your OutcomeDev dashboard if a matching task exists.
Finding Your Webhook Secret
For developers: Set the secret once in Vercel and share it with repo owners:
- Add to Vercel: Settings → Environment Variables → add
GITHUB_WEBHOOK_SECRET - Share this secret with repo owners — they all use the same one
Your webhook secret:
c6fe6c626fff6249e7ca011f541a4f25f296b070172b07fc0718bda954530da2
For repo owners: Your developer will give you the webhook secret above. Enter exactly what they provide — do not generate your own.
Events
OutcomeDev listens for the following webhook events:
| Event | Action | Behavior |
|---|---|---|
pull_request | closed + merged: true | Marks matching task as completed |
Only merged pull requests trigger the completion. Closed PRs that were not merged are ignored.
Troubleshooting
Webhook not being received?
- Verify the payload URL is correct and publicly accessible
- Check that the secret matches exactly (no extra spaces)
- Look for webhook delivery attempts in GitHub Settings > Webhooks > your webhook
Task not being marked as completed?
- Ensure a task with a matching PR number exists and is still in "processing" status
- Check the OutcomeDev server logs for
[GITHUB WEBHOOK]entries - The webhook only matches tasks where the PR number was recorded at task creation