From 5ca2cac61a40143180cd6ffe394494b5aeeacb00 Mon Sep 17 00:00:00 2001 From: James Garbutt <43081j@users.noreply.github.com> Date: Wed, 15 Oct 2025 10:08:27 +0100 Subject: [PATCH] fix: find correct comment --- build/main.js | 4 +++- src/main.ts | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/build/main.js b/build/main.js index c94966d..dad6dac 100644 --- a/build/main.js +++ b/build/main.js @@ -25228,7 +25228,9 @@ async function run() { per_page: perPage } )) { - const comment = comments.find((c) => c.body?.includes(COMMENT_TAG)); + const comment = comments.find( + (c) => c.user && c.user.login === "github-actions[bot]" && c.body?.includes(COMMENT_TAG) + ); if (comment) { existingCommentId = comment.id; break; diff --git a/src/main.ts b/src/main.ts index 07485ed..8d5db07 100644 --- a/src/main.ts +++ b/src/main.ts @@ -208,7 +208,12 @@ async function run(): Promise { } )) { // Search for the comment with the unique tag - const comment = comments.find((c) => c.body?.includes(COMMENT_TAG)); + const comment = comments.find( + (c) => + c.user && + c.user.login === 'github-actions[bot]' && + c.body?.includes(COMMENT_TAG) + ); if (comment) { existingCommentId = comment.id; break;