Skip to content

Commit b6406a2

Browse files
fix(webhook): skip review webhooks without reviewer id or timestamp
Guard pull_request_review submissions that lack review.user.id or review.submitted_at, matching the backfill path in github-fetcher.service.ts. Prevents webhook 500s and NOT NULL upsert failures on ghost reviewers. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent d6907d9 commit b6406a2

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎packages/das/src/webhook/handlers/review.handler.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ export class ReviewHandler {
2020
// Only store submitted reviews (not pending/dismissed)
2121
if (payload.action !== "submitted") return;
2222

23+
// Mirror backfill guard: skip reviews without a reviewer id or timestamp.
24+
if (!review?.user?.id || !review?.submitted_at) return;
25+
2326
const data: Partial<Review> = {
2427
repoFullName,
2528
prNumber: payload.pull_request.number,

0 commit comments

Comments
 (0)