API / handle-origin-check-run-webhooks

API

Handle Origin check run created and completed webhooks

Subscribe to repository.check_run.created and repository.check_run.completed. Official payload: llms-full.txt → Events and OpenAPI CheckRunWebhookPayload. Related: Handle Origin check run rerequested webhooks for the owner-only re-run event.

Origin is in Early Beta and subject to change. Subscribing needs repository:checks:read. Sep 16, 2026 breaking note: these two payloads no longer carry a top-level actor — read checkRun.actor (same principal as checkSuite.actor).

Events

event.type When it fires
repository.check_run.created A check run is created.
repository.check_run.completed A check run completes (including Origin timing out an in_progress run past deadlineAt with conclusion timed_out).

Payload fields

Field Meaning
repository Repository reference
checkSuite Owning suite snapshot (id, sha, key, name, externalId, actor, …)
checkRun Run snapshot at this lifecycle point (id, sha, key, name, status, conclusion, timings, output, actor, …)

checkRun.status is queued, in_progress, completed, or rerequested. Read conclusion when status is completed (values include success, failure, neutral, cancelled, skipped, timed_out, action_required, stale).

Sample event.payload (repository.check_run.completed shape):

{
  "repository": {
    "id": "repo_01k2ja2000e0080000000000q4",
    "name": "rocket",
    "owner": {
      "slug": "acme",
      "id": "ns_01k2ja2000e0080000000000p3",
      "type": "team"
    }
  },
  "checkSuite": {
    "id": "crg_01k2ja2000e0080000000000h8",
    "sha": "9a41f0c3d2b8e7f6a5c4d3e2f1b0a9c8d7e6f5a4",
    "key": "ci-8842",
    "name": "CI",
    "detailsUrl": "https://ci.acme.dev/runs/8842",
    "externalId": "build-8842",
    "actor": {
      "user": {
        "id": "user_01k2ja2000e0080000000000c3",
        "email": "jane@acme.dev"
      }
    }
  },
  "checkRun": {
    "id": "cr_01k2ja2000e0080000000000g7",
    "sha": "9a41f0c3d2b8e7f6a5c4d3e2f1b0a9c8d7e6f5a4",
    "key": "ci-8842-unit-tests",
    "name": "unit-tests",
    "status": "completed",
    "conclusion": "success",
    "detailsUrl": "https://ci.acme.dev/runs/8842",
    "externalUpdatedAt": "2026-08-02T14:44:30Z",
    "startedAt": "2026-08-02T14:40:00Z",
    "completedAt": "2026-08-02T14:44:30Z",
    "externalId": "run-8842",
    "actor": {
      "user": {
        "id": "user_01k2ja2000e0080000000000c3",
        "email": "jane@acme.dev"
      }
    },
    "output": {
      "title": "Unit tests",
      "summary": "128 tests passed.",
      "text": "All suites green."
    }
  }
}

Receiver tips

  1. Verify the signature, then branch on event.type.
  2. Key idempotency on webhook-id (delivery id). Suite/run identity for your own writes still uses (externalId, key) on the commit.
  3. On completed, gate merges or notify from checkRun.conclusion and checkRun.sha. Resolve open PRs with List Pull Requests headSha when you need PR context — this payload has no pull request object.
  4. Answer within 10 seconds; process annotations or deep fetches asynchronously.

Pitfalls

  • Do not read a payload-level actor on created/completed — it was removed Sep 16, 2026.
  • repository.check_run.rerequested is a different event delivered only to the owning app.
  • A timed-out run still delivers repository.check_run.completed with conclusion: "timed_out"; Origin leaves externalUpdatedAt unchanged so a later provider post can overwrite it.