Home/Docs/GitHub Webhooks

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:

  1. Receive a notification when a pull request is merged
  2. Find the matching task that was created for that PR
  3. Automatically mark the task as completed
  4. 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:

  1. Go to your Vercel project → SettingsEnvironment Variables
  2. Add GITHUB_WEBHOOK_SECRET with your generated secret value
  3. Redeploy for the variable to take effect

2. Configure the Webhook in GitHub

For each repository you want to connect:

  1. Go to your GitHub repository
  2. Navigate to Settings > Webhooks > Add webhook
  3. 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
  4. 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:

  1. Add to Vercel: SettingsEnvironment Variables → add GITHUB_WEBHOOK_SECRET
  2. 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:

EventActionBehavior
pull_requestclosed + merged: trueMarks 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