mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-09-30 11:33:14 +00:00
fix: filtering github bot comments (#587)
* fix: filtering gh bot comments * cr * cr * test empty commit * [skip ci] * [skip deploy]
This commit is contained in:
parent
1bb24ac7c8
commit
fb705d367a
2 changed files with 7 additions and 16 deletions
|
|
@ -381,11 +381,11 @@ export async function getIssueComments({
|
|||
return comments;
|
||||
}
|
||||
|
||||
return comments.filter((comment) => {
|
||||
return (
|
||||
comment.user?.type !== "Bot" || !comment.user?.name?.includes("[bot]")
|
||||
);
|
||||
});
|
||||
return comments.filter(
|
||||
(comment) =>
|
||||
comment.user?.type !== "Bot" &&
|
||||
!comment.user?.login?.includes("[bot]"),
|
||||
);
|
||||
},
|
||||
githubInstallationToken,
|
||||
"Failed to get issue comments",
|
||||
|
|
|
|||
|
|
@ -93,17 +93,8 @@ export async function getMissingMessages(
|
|||
});
|
||||
}
|
||||
|
||||
// Filter comments from the open swe bot
|
||||
const filteredComments = comments?.filter(
|
||||
(c) => c.user?.login.startsWith("open-swe") === false,
|
||||
);
|
||||
|
||||
const untrackedCommentMessages = filteredComments?.length
|
||||
? getUntrackedComments(
|
||||
input.messages,
|
||||
input.githubIssueId,
|
||||
filteredComments,
|
||||
)
|
||||
const untrackedCommentMessages = comments?.length
|
||||
? getUntrackedComments(input.messages, input.githubIssueId, comments)
|
||||
: [];
|
||||
|
||||
return [...(issueMessage ? [issueMessage] : []), ...untrackedCommentMessages];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue