LoopLoop
API ReferenceApiSignalsGithub

GitHub events webhook

Receives GitHub events (push, pull_request, issues). Verified via HMAC-SHA256 signature using GITHUB_WEBHOOK_SECRET.

POST
/api/signals/github

Request Body

application/json

[key: string]?unknown

Response Body

application/json

curl -X POST "http://localhost:5667/api/signals/github" \  -H "Content-Type: application/json" \  -d '{    "property1": null,    "property2": null  }'
{
  "data": {
    "signal": {
      "id": "cuid2_abc123",
      "source": "posthog",
      "sourceId": "evt_12345",
      "type": "error_rate",
      "severity": "high",
      "payload": {
        "event": "error_rate",
        "value": 0.22
      },
      "issueId": "cuid2_abc123",
      "createdAt": "2026-02-20T12:00:00.000Z"
    },
    "issue": {
      "id": "cuid2_abc123",
      "number": 1,
      "title": "[PostHog] error_rate: Login failures spiked",
      "description": "Auth failure rate exceeded 20% over the last hour.",
      "type": "signal",
      "status": "triage",
      "priority": 2,
      "parentId": null,
      "projectId": null,
      "signalSource": "posthog",
      "signalPayload": {
        "event": "error_rate",
        "value": 0.22
      },
      "hypothesis": {
        "statement": "Switching to a new auth provider will reduce login failures by 30%",
        "confidence": 0.75,
        "evidence": [
          "Login failure rate up 20%",
          "PostHog session data shows 15% drop-off"
        ],
        "validationCriteria": "Login failure rate drops below 5% within 30 days",
        "prediction": "Failure rate reduced to ~2%"
      },
      "agentSessionId": null,
      "agentSummary": null,
      "commits": [
        {
          "sha": "abc123def456",
          "message": "fix: correct auth token expiry",
          "url": "https://github.com/org/repo/commit/abc123",
          "author": "agent-claude",
          "timestamp": "2026-02-20T10:00:00Z"
        }
      ],
      "pullRequests": [
        {
          "number": 42,
          "title": "fix: correct auth token expiry",
          "url": "https://github.com/org/repo/pull/42",
          "state": "merged",
          "mergedAt": "2026-02-20T11:00:00Z"
        }
      ],
      "completedAt": null,
      "createdAt": "2026-02-20T12:00:00.000Z",
      "updatedAt": "2026-02-20T12:00:00.000Z",
      "deletedAt": null
    }
  }
}
Empty
Empty