mirror of
https://github.com/freeedcom/ai-codereviewer.git
synced 2025-06-28 20:14:14 +00:00
update
This commit is contained in:
parent
72059a0f86
commit
5b828ee105
1 changed files with 19 additions and 4 deletions
17
src/main.ts
17
src/main.ts
|
@ -226,7 +226,15 @@ async function main() {
|
|||
.split(",")
|
||||
.map((s) => s.trim());
|
||||
|
||||
const filteredDiff = parsedDiff.filter((file) => {
|
||||
const includePatterns = core
|
||||
.getInput("include")
|
||||
.split(",")
|
||||
.map((s) => s.trim());
|
||||
if (includePatterns.length === 0) {
|
||||
includePatterns.push("*")
|
||||
}
|
||||
|
||||
let filteredDiff = parsedDiff.filter((file) => {
|
||||
return !excludePatterns.some((pattern) => {
|
||||
let isMatch = minimatch(file.to ?? "", pattern);
|
||||
console.error(file + "," + file.to + "," + pattern + ": " + isMatch)
|
||||
|
@ -234,6 +242,13 @@ async function main() {
|
|||
}
|
||||
);
|
||||
});
|
||||
filteredDiff = filteredDiff.filter((file) => {
|
||||
return includePatterns.some((pattern) => {
|
||||
let isMatch = minimatch(file.to ?? "", pattern);
|
||||
return isMatch
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
const comments = await analyzeCode(filteredDiff, prDetails);
|
||||
if (comments.length > 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue