Skip to content

Commit

Permalink
fix: updated the match filter for the issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sshivaditya committed Nov 9, 2024
1 parent 979e34a commit f698377
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/adapters/supabase/helpers/issues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,11 @@ export class Issues extends SuperSupabase {
plaintext = null;
}
const issues = await this.getIssue(issueNodeId);
if (issues && issues.length == 0) {
if (!issues) {
this.context.logger.info("Issue does not exist, creating a new one");
await this.createIssue(issueNodeId, payload, isPrivate, markdown, authorId);
} else {
const { error } = await this.supabase.from("issues").update({ markdown, plaintext, embedding, payload, modified_at: new Date() }).eq("id", issueNodeId);

if (error) {
throw new Error("Error updating issue: " + error.message);
}
Expand Down
2 changes: 1 addition & 1 deletion src/handlers/issue-deduplication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export async function issueChecker(context: Context): Promise<boolean> {
});
return true;
}
if (similarIssues.length > 0) {
if (processedIssues.length > 0) {
logger.info(`Similar issue which matches more than ${context.config.warningThreshold} already exists`);
await handleSimilarIssuesComment(context, payload, issueBody, issue.number, processedIssues);
return true;
Expand Down

0 comments on commit f698377

Please sign in to comment.