refactor: improve comment formatting and streamline AI handling in findings processing
This commit is contained in:
+2
-3
@@ -12,9 +12,8 @@ export async function getPRDiff() {
|
||||
}
|
||||
|
||||
function filterDiff(diff, excludePrefixes) {
|
||||
const blocks = diff.split(/(?=^diff --git )/m);
|
||||
return blocks
|
||||
.filter(block => !excludePrefixes.some(prefix => block.match(new RegExp(`^diff --git a/${prefix.replace(/\//g, '\\/')}`))))
|
||||
return diff.split(/(?=^diff --git )/m)
|
||||
.filter(block => !excludePrefixes.some(p => block.startsWith(`diff --git a/${p}`)))
|
||||
.join('');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user