mirror of
https://github.com/freeedcom/ai-codereviewer.git
synced 2025-04-22 10:36:47 +00:00
Added debugging information for comments that are excluded from PRs actual code
This commit is contained in:
parent
6791d85b9d
commit
8ded98d88f
3 changed files with 17 additions and 1 deletions
|
@ -128,6 +128,14 @@ async function analyzeCode(
|
|||
const validAIResponses = aiResponse.filter((response) =>
|
||||
validLineNumbers.has(Number(response.lineNumber))
|
||||
);
|
||||
// Leave a log for each invalid line numbers for further debugging.
|
||||
aiResponse.forEach((response) => {
|
||||
if (!validLineNumbers.has(Number(response.lineNumber))) {
|
||||
console.log(
|
||||
`Invalid line number: ${response.lineNumber} in file: ${file.to}\nComment: ${response.reviewComment}`
|
||||
);
|
||||
}
|
||||
});
|
||||
const newComments = createComment(file, chunk, validAIResponses);
|
||||
if (newComments) {
|
||||
comments.push(...newComments);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue