From 844e655e7f35cd16fa2b8c4ef27aebbc82caf62f Mon Sep 17 00:00:00 2001 From: Brace Sproul Date: Thu, 17 Jul 2025 13:58:47 -0700 Subject: [PATCH] fix: Filter comments from open swe (#443) * fix: Filter comments from open swe * cr --- apps/open-swe/src/utils/github/issue-messages.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/apps/open-swe/src/utils/github/issue-messages.ts b/apps/open-swe/src/utils/github/issue-messages.ts index 3f1f3274..b1560020 100644 --- a/apps/open-swe/src/utils/github/issue-messages.ts +++ b/apps/open-swe/src/utils/github/issue-messages.ts @@ -92,8 +92,18 @@ export async function getMissingMessages( }, }); } - const untrackedCommentMessages = comments?.length - ? getUntrackedComments(input.messages, input.githubIssueId, comments) + + // Filter comments from the open swe bot + const filteredComments = comments?.filter( + (c) => c.user?.login !== "open-swe", + ); + + const untrackedCommentMessages = filteredComments?.length + ? getUntrackedComments( + input.messages, + input.githubIssueId, + filteredComments, + ) : []; return [...(issueMessage ? [issueMessage] : []), ...untrackedCommentMessages];