Skip to content

feat(github): Add resource event webhook handling - #702

Merged
dcramer merged 2 commits into
mainfrom
dcramer/feat/github-resource-event-webhooks
Jul 1, 2026
Merged

dcramer merged 2 commits into
mainfrom
dcramer/feat/github-resource-event-webhooks

Conversation

@dcramer

@dcramer dcramer commented Jul 1, 2026

Copy link
Copy Markdown
Member

Add host-owned GitHub webhook ingestion for resource event subscriptions. The new core route verifies GitHub webhook signatures, normalizes the MVP pull request events, and hands them to the existing resource-event ingestion path so matching subscriptions enqueue normal conversation work.

The GitHub event handling is split by webhook event type rather than collected into one large handler: pull request state, pull request review, and check suite normalization each live in their own module. The GitHub create-PR tool now only returns subscribable event hints when GITHUB_WEBHOOK_SECRET is configured, so the model only sees subscription affordances when GitHub webhooks are actually available.

Refs #682

Validation run:

  • pnpm --filter @sentry/junior-github test -- --runInBand
  • pnpm --filter @sentry/junior exec vitest run tests/unit/handlers/github-webhook.test.ts
  • pnpm --filter @sentry/junior-github typecheck
  • pnpm --filter @sentry/junior typecheck
  • pnpm --filter @sentry/junior-github lint
  • pnpm --filter @sentry/junior lint

Add a signed GitHub webhook route that normalizes pull request, review, and check suite events into core resource event ingestion. Keep per-event normalizers split by GitHub event type so new events can be added without growing one catch-all handler.

Only expose pull request subscription hints when GITHUB_WEBHOOK_SECRET is configured, so the model sees event affordances only when GitHub webhooks are available.

Refs #682

Co-Authored-By: Codex <[email protected]>
@vercel

vercel Bot commented Jul 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
junior-docs Ready Ready Preview, Comment Jul 1, 2026 1:00am

Request Review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 99383bb. Configure here.

Completed check suite webhooks can reference multiple pull requests for the same head SHA. Normalize each referenced pull request into its own resource event so subscriptions for later PRs in the payload receive check updates.

Refs #682

Co-Authored-By: Codex <[email protected]>
@dcramer
dcramer marked this pull request as ready for review July 1, 2026 01:04
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Jul 1, 2026
@dcramer
dcramer merged commit 4f43025 into main Jul 1, 2026
20 checks passed
@dcramer
dcramer deleted the dcramer/feat/github-resource-event-webhooks branch July 1, 2026 01:08

This branch was successfully deployed

1 active deployment
Preview – junior-docs — dd5c8540 Deployed Jul 1, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant