Skip to content

Commit

Permalink
Merge pull request #9 from freeedcom/ignore-deleted-files
Browse files Browse the repository at this point in the history
ignore deleted files
  • Loading branch information
villesau committed Apr 2, 2023
2 parents cc0ff7a + 1e21766 commit 32f7a83
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 32f7a83

Please sign in to comment.