Skip to content

Troubleshoot Webhooks and Provider Permissions

Inbound provider webhooks tell Colony that an issue, label, comment, pull request, or check changed. They are different from the outbound subscriptions under Colony Cloud Settings → Webhooks, which send Colony notifications to your own endpoints.

Follow one event from provider to pipeline:

  1. The provider emitted a supported event.
  2. The event reached Colony’s public receiver.
  3. Colony authenticated the request.
  4. The receiver mapped the repository and event.
  5. The Mayor applied the event or scheduled a catch-up poll.
  6. A Worker claimed any resulting task.

Do not restart Workers first when the event never reached the receiver, and do not rotate provider credentials when the task is already pending in Postgres.

  1. Open Settings → VCS Connections and confirm the coder App is healthy for the correct GitHub organization. Confirm the operations App as well when issue mutation, review, or merge is failing.
  2. Verify the repository is included in the App installation’s selected repository scope and enabled in Colony Cloud.
  3. In GitHub, inspect the App installation’s recent deliveries. Confirm the event was sent, note its delivery ID, response status, and response body.
  4. Compare the event time with Pipeline Events, the repository timeline, and connection-health messages in Colony Cloud.
  5. Reconnect or reinstall an App only when its installation was revoked, moved, or granted the wrong repositories. Reinstallation does not fix branch policy or an unhealthy Worker.

Cloud manages the inbound endpoint and signature secret. You should not create a separate GitHub webhook for a normal Cloud-connected repository.

Configure the receiver and an HMAC secret:

webhook:
enabled: true
port: 9800
secret_env: GITHUB_WEBHOOK_SECRET

Start the optional Compose profile with docker compose --profile webhook up -d, expose the receiver over HTTPS, and register the public /webhook URL in GitHub. The secret entered in GitHub must match the environment variable available to the receiver container.

GitHub requests must include a valid X-Hub-Signature-256. A missing or mismatched signature returns an authentication error before repository routing.

Provider and webhook configuration are startup-only. Restart the receiver, Mayor, and any process whose provider identity changed; config hot reload does not replace these clients.

  1. Confirm the receiver’s health endpoint is reachable inside the deployment before testing its public URL.
  2. Send a provider test delivery. Do not use an unsigned curl body as proof that GitHub signature handling works.
  3. Inspect receiver logs for the delivery ID, event name, repository mapping, status, and authentication result.
  4. Inspect Mayor logs or pipeline events for the applied wake event.
  5. Confirm the resulting task appears in the task queue and that a Worker is available for that repository.
FailureIdentity and permission to inspect
Clone, branch, commit, push, or open PRCoder GitHub App/PAT or ADO coder PAT; repository/code write access.
Add labels/tags, comments, or issue stateOperations identity where configured; issue/work-item write access.
Publish formal review or approveOperations identity; pull-request review permission; identity must differ from author when required.
MergeOperations API permission plus coder git permission for any rebase/force-push step; branch policy must allow the result.
Read CI checksProvider checks/build read permission and exact configured check names.
Administer branch policyRepository administration on GitHub or policy administration on ADO.

For self-hosted installations, run both checks after changing credentials:

Terminal window
colony check --stage credentials
colony check --stage repository

The first validates identity access; the second exercises the target repository. Container credentials must also be present inside the relevant process, not only in the host shell.

The self-hosted Mayor periodically performs a full provider sync. When webhook activity is absent, the inactivity fallback forces full syncs rather than trusting an empty event cache. This keeps the pipeline functional without webhooks, but increases provider API traffic and response latency.

Webhooks are healthy when events arrive and the Mayor can use cache-first cycles between scheduled full syncs. If logs repeatedly report webhook inactivity despite provider deliveries, fix receiver-to-Mayor dispatch rather than lowering the poll interval.

  1. Correct endpoint, secret, App installation, PAT scope, or repository mapping.
  2. Restart only processes that consume the changed startup credential or provider configuration.
  3. Re-run provider and Colony checks.
  4. Redeliver the original provider event when the provider supports it, or wait for the Mayor’s full-sync safety net.
  5. Confirm exactly one pipeline row exists and the expected task is pending, claimed, or complete.