style(ai-review 統計): 改用三欄兩行表格
AI / 計算版本號 (pull_request) Successful in 2s
AI / Code Review (pull_request) Failing after 1m10s

This commit is contained in:
2026-06-22 10:07:43 +00:00
parent df3234bf19
commit 71c9b40c0b
2 changed files with 11 additions and 14 deletions
+7 -6
View File
@@ -62,15 +62,16 @@ function countBy(findings, predicate) {
function buildReviewSummary(findings, commentable) {
const unplacedCount = findings.length - commentable.length;
const criticalCount = countBy(findings, f => f.level === 'critical');
const warningCount = countBy(findings, f => f.level === 'warning');
const infoCount = countBy(findings, f => f.level === 'info');
return [
'## AI Code Review 統計',
'',
`總問題:${findings.length}`,
`可標註檔案與行數:${commentable.length}`,
`無法標註檔案與行數${unplacedCount}`,
`嚴重:${countBy(findings, f => f.level === 'critical')}`,
`警告:${countBy(findings, f => f.level === 'warning')}`,
`建議:${countBy(findings, f => f.level === 'info')}`,
'| 統計 | 統計 | 統計 |',
'| --- | --- | --- |',
`| **總問題**<br>${findings.length} 筆 | **可標註檔案與行數**<br>${commentable.length} 筆 | **無法標註檔案與行數**<br>${unplacedCount} |`,
`| **🔴 嚴重**<br>${criticalCount} 筆 | **🟡 警告**<br>${warningCount} 筆 | **🔵 建議**<br>${infoCount} |`,
].join('\n');
}