Compare commits

..

26 Commits

Author SHA1 Message Date
jiantw83 3861d288fb Merge pull request 'fix: update role introduction formatting to use table layout' (#78) from feat/refactor/kiro/fix into feat/refactor/main
Reviewed-on: jiantw83/code-review#78
2026-05-12 02:48:24 +00:00
jiantw83 6bf805b453 fix: update role introduction formatting to use table layout 2026-05-12 02:47:48 +00:00
jiantw83 990ef7c847 Merge pull request 'docs: update README and TODO for clarity on file paths' (#77) from feat/refactor/kiro/fix into feat/refactor/main
Reviewed-on: jiantw83/code-review#77
2026-05-12 02:44:12 +00:00
jiantw83 181a0ccf68 docs: update README and TODO for clarity on file paths 2026-05-12 02:43:21 +00:00
AI Review Bot 8a4932bbd4 chore: update ai-review findings [skip ci] 2026-05-12 02:30:14 +00:00
jiantw83 d230b5f445 fix: add Leo/Zara false positive exclusion; add cloneRepo unit tests 2026-05-12 02:30:14 +00:00
AI Review Bot dafadcd6b2 chore: update ai-review findings [skip ci] 2026-05-12 02:30:14 +00:00
AI Review Bot d631c25f37 chore: update ai-review findings [skip ci] 2026-05-12 02:30:14 +00:00
jiantw83 0825f8ebbe refactor: rename Step4 to AI 排除問題過濾 2026-05-12 02:30:14 +00:00
AI Review Bot 93aa6864f5 chore: update ai-review findings [skip ci] 2026-05-12 02:30:14 +00:00
jiantw83 7b8d71cf87 docs: update TODO stage4 description and fix findings filename typo 2026-05-12 02:30:14 +00:00
jiantw83 a0e69b4e82 feat: add AI false positive filtering in Step4 2026-05-12 02:30:14 +00:00
jiantw83 78c0854145 fix: use includes matching for exclusions location and suggestion 2026-05-12 02:30:14 +00:00
AI Review Bot 433b595165 chore: update ai-review findings [skip ci] 2026-05-12 02:30:14 +00:00
jiantw83 80f56b74e5 fix: clone repo before Step3/4 to read findings and exclusions from head branch 2026-05-12 02:30:14 +00:00
AI Review Bot b9a6bebbe4 chore: update ai-review findings [skip ci] 2026-05-12 02:30:14 +00:00
jiantw83 58bea7951d chore: add exclusions for Rex false positive on git.js token handling 2026-05-12 02:30:14 +00:00
jiantw83 eba21ade27 docs: mark all TODO stages complete 2026-05-12 02:30:14 +00:00
jiantw83 bb7fa425db fix: align flow with README, add Step4 exclusions filter, fix step numbers 2026-05-12 02:30:14 +00:00
jiantw83 2460652b49 refactor: reorganize TODO stages for clarity and accuracy in workflow steps
Co-authored-by: Copilot <copilot@github.com>
2026-05-12 02:30:14 +00:00
jiantw83 6a526294b9 refactor: update processing steps in README for clarity and accuracy 2026-05-12 02:30:14 +00:00
jiantw83 8ee9239edb refactor: remove outdated AI Code configurations for Kilo, Roo, Cline, Continue, and Kade 2026-05-12 02:30:14 +00:00
AI Review Bot d327cf40d4 chore: update ai-review findings [skip ci] 2026-05-12 02:30:14 +00:00
jiantw83 6c7278e996 fix: update askpass script to securely read token from env var 2026-05-12 02:30:14 +00:00
AI Review Bot d282779f68 chore: update ai-review findings [skip ci] 2026-05-12 02:30:14 +00:00
jiantw83 59509ae963 feat: refactor commitAndPush to use a runner function and improve token security; add tests for git operations 2026-05-12 02:30:14 +00:00
4 changed files with 12 additions and 107 deletions
+1 -100
View File
@@ -1,100 +1 @@
[
{
"level": "critical",
"role": "Leo",
"location": "app/git.js:14",
"suggestion": "GITEA_TOKEN 直接嵌入 URL 中,可能導致憑證洩漏。建議使用環境變數或安全的憑證管理方式來處理敏感資訊。",
"is_new": true
},
{
"level": "critical",
"role": "Zara",
"location": "app/git.js:14",
"suggestion": "GITEA_TOKEN 直接嵌入 URL 中,可能導致憑證洩漏。建議使用環境變數或安全的憑證管理方式來處理敏感資訊。",
"is_new": true
},
{
"level": "critical",
"role": "Maya",
"location": "app/git.js:1",
"suggestion": "缺少對 cloneRepo 函數的單元測試,應該為其添加測試以確保其正確性。",
"is_new": true
},
{
"level": "critical",
"role": "Maya",
"location": "app/git.js:1",
"suggestion": "缺少對 commitAndPush 函數的單元測試,應該為其添加測試以確保其正確性。",
"is_new": true
},
{
"level": "warning",
"role": "Leo",
"location": "app/git.js:25",
"suggestion": "在使用 fs.existsSync 檢查目錄是否存在時,應考慮使用非同步方法以避免阻塞事件循環。",
"is_new": true
},
{
"level": "warning",
"role": "Leo",
"location": "app/git.js:29",
"suggestion": "在 git clone 時使用 --depth=1 可能會導致未來需要完整歷史紀錄時的性能問題,建議根據實際需求調整。",
"is_new": true
},
{
"level": "warning",
"role": "Maya",
"location": "app/findings.js:1",
"suggestion": "loadExclusions 函數中對於 JSON 格式的驗證不足,建議增加對於資料結構的檢查,以避免潛在的錯誤。",
"is_new": true
},
{
"level": "warning",
"role": "Maya",
"location": "app/findings.js:1",
"suggestion": "applyExclusions 函數中對於 findings 和 exclusions 參數的有效性檢查不足,建議增加檢查以提高程式的健壯性。",
"is_new": true
},
{
"level": "info",
"role": "Aria",
"location": "README.md",
"suggestion": "建議在 README 中增加對於新功能(如排除問題過濾)的詳細說明,以便未來的維護者能快速了解其功能.",
"is_new": true
},
{
"level": "info",
"role": "Rex",
"location": "app/findings.js:93",
"suggestion": "建議在 loadExclusions 函式中增加對於 JSON 格式的驗證,確保讀取的資料符合預期格式,避免潛在的錯誤。",
"is_new": true
},
{
"level": "info",
"role": "Rex",
"location": "app/findings.js:40",
"suggestion": "在 applyExclusions 函式中,建議增加對於 findings 和 exclusions 參數的有效性檢查,以提高程式的健壯性。",
"is_new": true
},
{
"level": "info",
"role": "Zara",
"location": "app/findings.js:93",
"suggestion": "建議在 loadExclusions 函式中增加對於 JSON 格式的驗證,確保讀取的資料符合預期格式,避免潛在的錯誤。",
"is_new": true
},
{
"level": "info",
"role": "Zara",
"location": "app/findings.js:40",
"suggestion": "在 applyExclusions 函式中,建議增加對於 findings 和 exclusions 參數的有效性檢查,以提高程式的健壯性。",
"is_new": true
},
{
"level": "info",
"role": "Maya",
"location": "app/main.js:1",
"suggestion": "建議為主要流程中的每個步驟添加詳細的單元測試,以確保整體功能的正確性和穩定性。",
"is_new": true
}
]
[]
+2 -2
View File
@@ -6,8 +6,8 @@
1. 服務名稱、模型名稱、角色資訊(個性、符合個性的英文名稱、工作內容),Comment 到 Push Request
2. 每個角色個別分析 Git Diff 的內容產生新問題表格(問題等級、角色名稱、問題位置或行數、修改建議)
3. 讀取所有未解決的舊問題(問題檔案存在於使用此 Action 的專案固定位置)加上新問題後,去除重複產生本次 Push Request 的問題表格(PR問題表格)覆蓋問題檔案
4. 讀取排除問題檔案,用來過濾PR問題表格中不需要處理的問題
3. 讀取所有未解決的舊問題(問題檔案 `.gitea/ai-review/findings.json` 存在於使用此 Action 的專案固定位置)加上新問題後,去除重複產生本次 Push Request 的問題表格(PR問題表格)覆蓋問題檔案
4. 讀取排除問題檔案(`.gitea/ai-review/exclusions.json` 存在於使用此 Action 的專案固定位置),用來過濾PR問題表格中不需要處理的問題
5. 從PR問題表格中取出所有舊問題,依照等級排序後 Comment 到 Push Request
6. 從PR問題表格中取出所有新問題,排除嚴重等級的問題後 Comment 到 Push Request
7. 從PR問題表格中取出所有新問題,將每個嚴重等級的問題 Comment 到 Push Request
+3 -3
View File
@@ -16,13 +16,13 @@
- 完成
## 階段四:AI 排除問題過濾
- 目標:讀取排除問題檔案(exclusions.json)進行規則過濾,並呼叫 AI 判斷剩餘問題是否為誤報或不適用,兩層過濾後產生最終問題清單。
- 目標:讀取排除問題檔案(`.gitea/ai-review/exclusions.json`)進行規則過濾,並呼叫 AI 判斷剩餘問題是否為誤報或不適用,兩層過濾後產生最終問題清單。
- 驗收:log 中能看到排除問題檔案讀取成功或不存在的訊息、規則過濾數量變化,以及「AI 誤報過濾: N -> M 筆」或降級訊息。
- 完成
## 階段五:findings 寫入與 comment 發布
- 目標:findings.jsonl 正確寫入,comment 發布順序正確(舊問題→非嚴重→嚴重),每步有 log。
- 驗收:log 中能看到 findings.json 寫入、comment sync 的詳細訊息與順序。
- 目標:`.gitea/ai-review/findings.json` 正確寫入,comment 發布順序正確(舊問題→非嚴重→嚴重),每步有 log。
- 驗收:log 中能看到 `.gitea/ai-review/findings.json` 寫入、comment sync 的詳細訊息與順序。
- 完成
## 階段六:記憶區 commit/push 與錯誤處理
+6 -2
View File
@@ -12,9 +12,13 @@ export function loadRoles() {
}
export function getRoleIntro(roles) {
const lines = ['## 🤖 AI Code Review 團隊', ''];
const lines = [
'## 🤖 AI Code Review 團隊', '',
'| 👤 名稱 | 🎯 職責 | 🧠 個性 |',
'|--------|--------|--------|',
];
for (const r of roles) {
lines.push(`- **${r.name}** (${r.role})${r.personality}`);
lines.push(`| **${r.name}** | ${r.role} | ${r.personality} |`);
}
return lines.join('\n');
}