Skip to content

Commit

Permalink
fix: logger issues for issueCheck
Browse files Browse the repository at this point in the history
  • Loading branch information
sshivaditya committed Nov 30, 2024
1 parent 01b3aee commit 9c14406
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/handlers/issue-deduplication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export async function issueChecker(context: Context<"issues.opened" | "issues.ed
);
const matchIssues = processedIssues.filter((issue) => parseFloat(issue.similarity) >= context.config.matchThreshold);
if (matchIssues.length > 0) {
logger.info(`Similar issue which matches more than ${context.config.matchThreshold} already exists`);
logger.info(`Similar issue which matches more than ${context.config.matchThreshold} already exists`, { matchIssues });
//To the issue body, add a footnote with the link to the similar issue
const updatedBody = await handleMatchIssuesComment(context, payload, issueBody, processedIssues);
issueBody = updatedBody || issueBody;
Expand All @@ -64,7 +64,7 @@ export async function issueChecker(context: Context<"issues.opened" | "issues.ed
return;
}
if (processedIssues.length > 0) {
logger.info(`Similar issue which matches more than ${context.config.warningThreshold} already exists`);
logger.info(`Similar issue which matches more than ${context.config.warningThreshold} already exists`, { processedIssues });
await handleSimilarIssuesComment(context, payload, issueBody, issue.number, processedIssues);
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/handlers/issue-matching.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export async function issueMatching(context: Context<"issues.opened" | "issues.e
}
}

logger.ok(`Exiting issueMatching handler!`, { similarIssues: similarIssues || "No similar issues found" });
logger.info(`Exiting issueMatching handler!`, { similarIssues: similarIssues || "No similar issues found" });
}

/**
Expand Down

0 comments on commit 9c14406

Please sign in to comment.