refactor(ai-review 統計): 精簡 action log 統計輸出
AI / 計算版本號 (pull_request) Successful in 2s
AI / Code Review (pull_request) Successful in 1m26s

This commit is contained in:
2026-06-23 02:27:18 +00:00
parent 88618f364a
commit 31de74c603
3 changed files with 27 additions and 14 deletions
+2 -3
View File
@@ -3,7 +3,7 @@ import { GITEA_REPOSITORY, PR_NUMBER, PR_HEAD_BRANCH, PR_BASE_BRANCH, getLLMConf
import { loadRoles, getRoleIntro } from './roles.js';
import { getPRDiff, postComment, getCommitMessageBySha, getBotReviewOutcome, shouldSkipBotCommit } from './gitea.js';
import { analyzeWithRole, loadOldFindings, mergeFindings, sortByLevel, deduplicateWithAI, loadExclusions, applyExclusions, filterFalsePositivesWithAI } from './findings.js';
import { saveFindings, postFindingsReview, formatFindingsStats } from './comments.js';
import { saveFindings, postFindingsReview, formatFindingsStatsLine } from './comments.js';
import { cloneRepo, commitAndPush, getRepoState } from './git.js';
import { validateJSONArrayFile, ensureJSONArrayFileExists } from './json.js';
import { runPreflight } from './preflight.js';
@@ -12,8 +12,7 @@ import { section, step, line, ok, warn, error } from './log.js';
const WORKSPACE = process.env.GITHUB_WORKSPACE || '/workspace';
function logFindingsStats(label, findings) {
line(`${label}:`);
for (const row of formatFindingsStats(findings).split('\n')) line(row);
line(`${label}: ${formatFindingsStatsLine(findings)}`);
}
async function main() {