From 59312610950dd39b47a21e28ba1a68f582e981b2 Mon Sep 17 00:00:00 2001 From: Jarun Madhesh Date: Fri, 6 Mar 2026 10:52:06 +0530 Subject: [PATCH] Delete all bot comments Signed-off-by: Jarun Madhesh --- apps/github.js | 2 +- dist/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/github.js b/apps/github.js index 7fb049d..97d2303 100644 --- a/apps/github.js +++ b/apps/github.js @@ -30,7 +30,7 @@ async function resolveAllComments(context, prNumber) { ) for (const comment of comments) { - if (comment.user.login !== 'cursor[bot]' && comment.user.login !== 'snyk-io[bot]') continue; + if (!comment.user.login.endsWith("[bot]")) continue; console.log("deleting comment : " + comment.id); await context.octokit.request( 'DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}', diff --git a/dist/index.js b/dist/index.js index b28f8cf..de6ae26 100644 --- a/dist/index.js +++ b/dist/index.js @@ -59,7 +59,7 @@ async function resolveAllComments(context, prNumber) { ) for (const comment of comments) { - if (comment.user.login !== 'cursor[bot]' && comment.user.login !== 'snyk-io[bot]') continue; + if (!comment.user.login.endsWith("[bot]")) continue; console.log("deleting comment : " + comment.id); await context.octokit.request( 'DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}',