From 1e217661a4f9393e302de28009f42683be42fd09 Mon Sep 17 00:00:00 2001 From: Ville Saukkonen Date: Sun, 2 Apr 2023 17:57:01 +0300 Subject: [PATCH] ignore deleted files --- src/main.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.ts b/src/main.ts index 8b0da9c..9004125 100644 --- a/src/main.ts +++ b/src/main.ts @@ -64,6 +64,7 @@ async function analyzeCode( const comments: Array<{ body: string; path: string; line: number }> = []; for (const file of parsedDiff) { + if (file.to === "/dev/null") continue; // Ignore deleted files for (const chunk of file.chunks) { const prompt = createPrompt(file, chunk, prDetails); const aiResponse = await getAIResponse(prompt);