From 31d1e1f650f62ddb51446f317598adcb061fdf1d Mon Sep 17 00:00:00 2001 From: Chris Estreich Date: Wed, 2 Jul 2025 12:14:43 -0800 Subject: [PATCH] Don't process comments from @roomote (#189) --- .../src/app/api/webhooks/github/handlers/issueCommentHandler.ts | 2 +- .../webhooks/github/handlers/pullRequestReviewCommentHandler.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/roomote/src/app/api/webhooks/github/handlers/issueCommentHandler.ts b/apps/roomote/src/app/api/webhooks/github/handlers/issueCommentHandler.ts index d1da93bc3c..cb9a33da17 100644 --- a/apps/roomote/src/app/api/webhooks/github/handlers/issueCommentHandler.ts +++ b/apps/roomote/src/app/api/webhooks/github/handlers/issueCommentHandler.ts @@ -40,7 +40,7 @@ export async function handleIssueCommentEvent(body: string) { return NextResponse.json({ message: 'action_ignored' }); } - if (!comment.body.includes('@roomote')) { + if (!comment.body.includes('@roomote') && comment.user.login !== 'roomote') { return NextResponse.json({ message: 'no_roomote_mention' }); } diff --git a/apps/roomote/src/app/api/webhooks/github/handlers/pullRequestReviewCommentHandler.ts b/apps/roomote/src/app/api/webhooks/github/handlers/pullRequestReviewCommentHandler.ts index 23ad0a92ea..e6a63d3ebe 100644 --- a/apps/roomote/src/app/api/webhooks/github/handlers/pullRequestReviewCommentHandler.ts +++ b/apps/roomote/src/app/api/webhooks/github/handlers/pullRequestReviewCommentHandler.ts @@ -41,7 +41,7 @@ export async function handlePullRequestReviewCommentEvent(body: string) { return NextResponse.json({ message: 'action_ignored' }); } - if (!comment.body.includes('@roomote')) { + if (!comment.body.includes('@roomote') && comment.user.login !== 'roomote') { return NextResponse.json({ message: 'no_roomote_mention' }); }