From 9c14406a81a4174e12bbbf6e7320c9367f6c1486 Mon Sep 17 00:00:00 2001 From: Shivaditya Shivganesh Date: Sat, 30 Nov 2024 17:07:10 -0500 Subject: [PATCH] fix: logger issues for issueCheck --- src/handlers/issue-deduplication.ts | 4 ++-- src/handlers/issue-matching.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/handlers/issue-deduplication.ts b/src/handlers/issue-deduplication.ts index 5ffa6f2..534547d 100644 --- a/src/handlers/issue-deduplication.ts +++ b/src/handlers/issue-deduplication.ts @@ -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; @@ -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; } diff --git a/src/handlers/issue-matching.ts b/src/handlers/issue-matching.ts index 22ecc65..e2c2da0 100644 --- a/src/handlers/issue-matching.ts +++ b/src/handlers/issue-matching.ts @@ -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" }); } /**