ignore deleted files

This commit is contained in:
Ville Saukkonen 2023-04-02 17:57:01 +03:00
parent 094797a201
commit 1e217661a4

@ -64,6 +64,7 @@ async function analyzeCode(
const comments: Array<{ body: string; path: string; line: number }> = []; const comments: Array<{ body: string; path: string; line: number }> = [];
for (const file of parsedDiff) { for (const file of parsedDiff) {
if (file.to === "/dev/null") continue; // Ignore deleted files
for (const chunk of file.chunks) { for (const chunk of file.chunks) {
const prompt = createPrompt(file, chunk, prDetails); const prompt = createPrompt(file, chunk, prDetails);
const aiResponse = await getAIResponse(prompt); const aiResponse = await getAIResponse(prompt);