You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(integrations): Set ViewerContext on webhook handlers (#112284)
Add `webhook_viewer_context(org_id)` helper that wraps webhook per-org
processing in `viewer_context_scope` with `actor_type=INTEGRATION`.
Gated behind the `viewer-context.enabled` option so it rolls out with
the rest of the ViewerContext infrastructure.
Wired into 5 webhook handlers at the point where `organization_id` is
known:
- **GitHub** — inside per-repo loop in `GitHubWebhook.__call__`
- **GitLab** — inside per-install loop in `GitlabWebhookEndpoint.post`
- **Bitbucket** — wrapping handler call (org from URL param)
- **Bitbucket Server** — wrapping handler call (org from URL param)
- **Cursor** — wrapping `_process_webhook` (org from URL param)
Remaining integrations (Slack, Jira Server, MS Teams, Vercel) resolve
the organization deeper in the stack and need separate work — they're
tracked but not in scope here.
Part of the [ViewerContext
RFC](https://www.notion.so/sentry/RFC-Unified-ViewerContext-via-ContextVar-32f8b10e4b5d81988625cb5787035e02).
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
0 commit comments