Skip to content

Commit 7b88833

Browse files
authored
fix: find correct comment (#60)
1 parent a092543 commit 7b88833

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

build/main.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25228,7 +25228,9 @@ async function run() {
2522825228
per_page: perPage
2522925229
}
2523025230
)) {
25231-
const comment = comments.find((c) => c.body?.includes(COMMENT_TAG));
25231+
const comment = comments.find(
25232+
(c) => c.user && c.user.login === "github-actions[bot]" && c.body?.includes(COMMENT_TAG)
25233+
);
2523225234
if (comment) {
2523325235
existingCommentId = comment.id;
2523425236
break;

src/main.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,12 @@ async function run(): Promise<void> {
208208
}
209209
)) {
210210
// Search for the comment with the unique tag
211-
const comment = comments.find((c) => c.body?.includes(COMMENT_TAG));
211+
const comment = comments.find(
212+
(c) =>
213+
c.user &&
214+
c.user.login === 'github-actions[bot]' &&
215+
c.body?.includes(COMMENT_TAG)
216+
);
212217
if (comment) {
213218
existingCommentId = comment.id;
214219
break;

0 commit comments

Comments
 (0)