GitHub webhooks: failed workflows, deployments and Dependabot alerts as signals

Send a repository's or an organization's GitHub webhooks to Pulso and turn failed workflow runs, failed deployments and critical Dependabot alerts into signals.

GitHub can tell Pulso when a workflow fails on the main branch, a deployment to production goes wrong or Dependabot finds a critical vulnerability. Each becomes a signal with an owner and the steps to follow, instead of an email nobody reads.

Connect GitHub#

Add GitHub to Pulso to create a webhook source called GitHub; it shows these steps with the source’s URL and secret, then creates the monitors below that you pick, but the heartbeat, which needs your workflow’s path, with their playbooks and a report. To start from scratch instead, create a webhook data source called GitHub.

  1. In the repository, open Settings > Webhooks and click Add webhook. For every repository of an organization, do it in the organization’s Settings instead.
  2. Paste the source’s Endpoint URL, https://hooks.pulso.run/webhooks/<id>/<token>, as the Payload URL.
  3. Set Content type to application/json. With application/x-www-form-urlencoded, GitHub sends the payload as one form field, and it arrives as a single payload column holding JSON text.
  4. Set the Secret GitHub signs each delivery with to the source’s Signing secret, under Signatures with the GitHub scheme: Add to Pulso makes one up and refuses deliveries not signed with it; from scratch, set a long random one there.
  5. Choose Let me select individual events and pick the events you need, such as workflow_run, deployment_status and dependabot_alert.
  6. Keep Active checked and click Add webhook.

GitHub sends a ping event right away, which shows up under the source’s Recent events. The REST API creates the same webhook with POST /repos/{owner}/{repo}/hooks or POST /orgs/{org}/hooks.

What arrives#

This is GitHub’s example of a workflow_run event with the completed action, trimmed:

{
  "action": "completed",
  "workflow_run": {
    "id": 289782451,
    "name": "",
    "display_title": "ci(action): update actions/setup-node digest to 8c91899",
    "head_branch": "master",
    "head_sha": "3484a3fb816e0859fd6e1cea078d76385ff50625",
    "event": "repository_dispatch",
    "status": "completed",
    "conclusion": "success",
    "run_number": 163,
    "run_attempt": 1,
    "html_url": "https://github.com/octo-org/octo-repo/actions/runs/289782451",
    "pull_requests": [],
    "actor": { "login": "Codertocat" }
  },
  "workflow": {
    "name": "test",
    "path": ".github/workflows/test.yml"
  },
  "repository": { "full_name": "octo-org/octo-repo" },
  "sender": { "login": "Codertocat" }
}

Its monitors see these columns:

Column Value
action completed
workflow_run.id 289782451
workflow_run.display_title ci(action): update actions/setup-node digest to 8c91899
workflow_run.head_branch master
workflow_run.event repository_dispatch
workflow_run.conclusion success
workflow_run.run_attempt 1
workflow_run.html_url https://github.com/octo-org/octo-repo/actions/runs/289782451
workflow_run.pull_requests [], the whole list in one column
workflow_run.actor.login Codertocat
workflow.name test
workflow.path .github/workflows/test.yml
repository.full_name octo-org/octo-repo

workflow_run.conclusion is one of success, failure, neutral, cancelled, timed_out, action_required, stale or skipped.

Telling events apart#

GitHub names the event only in the X-GitHub-Event header, which Pulso keeps as the http_headers.x_github_event column. Filter on it, http_headers.x_github_event equals workflow_run, alongside the event’s own columns, like workflow_run.conclusion. The delivery’s id is in http_headers.x_github_delivery, the same when GitHub redelivers it.

Monitors to build#

Failed workflow runs on main#

Failed deployments to production#

Critical Dependabot alerts#

Heartbeat: the nightly workflow didn’t run#

A heartbeat monitor with filters http_headers.x_github_event equals workflow_run, action equals completed and workflow.path equals .github/workflows/nightly.yml, Frequency daily at the workflow’s time and a grace period that covers how long it takes. Any completed run counts, so a run that fails is the first monitor’s job; this one catches the night the schedule didn’t fire at all.

Limits#

Sources: GitHub’s creating webhooks, webhook events and payloads, handling failed deliveries, and the payload examples and schemas in octokit/webhooks.


Add GitHub to Pulso: a webhook source, 3 monitors with their playbooks and a report, then these steps with the source's URL.

Add to Pulso

See the monitors, their playbooks and the report