feat(code-review-resolve): 改採新版 findings wrapper 格式並新增 --issue 議題模式(0.0.7) #10

Merged
admin merged 2 commits from develop into master 2026-07-20 06:24:17 +00:00
Member

變更摘要

code-review-resolve skill 對齊新版 AI Code Reviewnode-actions/ai-code-review)的實際產出格式,並新增議題模式--issue);plugin 版本 bump 至 0.0.7

主要異動

feat(code-review-resolve)

1. findings / exclusions 模板改為新版格式

  • findings 位置:從單一 .gitea/ai-review/findings.json 改為目錄 .gitea/ai-review/findings/,每次 review 一個時間戳檔(如 2026-07-20-14:30:15.json)。
  • findings 結構:頂層改為 wrapper 物件 { generatedAt, commitSha, prNumber, tool, findings:[], excluded:[] },讀取時取其 findings 陣列。
  • finding 欄位:更新為 id / reviewer / focus / badge / severity(中文:嚴重·警告·建議)/ file / startLine / endLine / problem / suggestion / suggestedCode
  • exclusions 欄位:對齊 action 寫入 schema addedAt / prNumber / reviewer / severity / file / startLine / endLine / problem / reason
  • 等級:由 4 級 🔴🟠🟡🔵 調整為 3 級 🔴嚴重 → 🟠警告 → 🔵建議。
  • B4 寫回:逐檔就地只更新該 wrapper 的 findings 陣列,其餘 metadata 原樣保留;讀到非 wrapper(舊格式)直接回報並停止。

2. 新增 --issue <議題編號> 議題模式

  • 新增 B0:帶 --issue 時讀 Gitea 議題標題/描述/全部留言,解析每則「嚴重問題留言」(action severeCommentBody 格式)為一條 finding 進 B 逐條修復。
  • 新增 B5:修復後在議題留言回報進度;全部解決或登記誤報時自動關閉議題(PATCH state=closed),仍有待人工處理則只留言不關閉;誤報仍寫入 exclusions.json
  • 同步更新 frontmatter description、argument-hint、intro、階段表、參數、commit 分類、總結與呼叫範例。

chore(plugin 版本)

  • plugin.json.claude-plugin/plugin.json.codex-plugin/plugin.json 版本號 0.0.60.0.7

影響範圍

  • 僅影響 code-review-resolve skill 的問題讀取/寫回行為、新增議題模式,與版本號;不動其他 skill。
  • 依決策採「只支援新格式」:舊版頂層陣列 findings 會被視為不合法並回報停止(不向後相容)。

風險與注意事項

  • 純文件(SKILL.md)與 manifest 版本號變更,無程式碼執行風險。
  • 議題模式與寫入 exclusions 需 GITEA_TOKEN 與可解析的 origin repo 座標。
## 變更摘要 將 `code-review-resolve` skill 對齊**新版 AI Code Review**(`node-actions/ai-code-review`)的實際產出格式,並新增**議題模式**(`--issue`);plugin 版本 bump 至 `0.0.7`。 ## 主要異動 ### feat(code-review-resolve) **1. findings / exclusions 模板改為新版格式** - **findings 位置**:從單一 `.gitea/ai-review/findings.json` 改為目錄 `.gitea/ai-review/findings/`,每次 review 一個時間戳檔(如 `2026-07-20-14:30:15.json`)。 - **findings 結構**:頂層改為 **wrapper 物件** `{ generatedAt, commitSha, prNumber, tool, findings:[], excluded:[] }`,讀取時取其 `findings` 陣列。 - **finding 欄位**:更新為 `id / reviewer / focus / badge / severity(中文:嚴重·警告·建議)/ file / startLine / endLine / problem / suggestion / suggestedCode`。 - **exclusions 欄位**:對齊 action 寫入 schema `addedAt / prNumber / reviewer / severity / file / startLine / endLine / problem / reason`。 - **等級**:由 4 級 🔴🟠🟡🔵 調整為 3 級 🔴嚴重 → 🟠警告 → 🔵建議。 - **B4 寫回**:逐檔就地只更新該 wrapper 的 `findings` 陣列,其餘 metadata 原樣保留;讀到非 wrapper(舊格式)直接回報並停止。 **2. 新增 `--issue <議題編號>` 議題模式** - 新增 **B0**:帶 `--issue` 時讀 Gitea 議題標題/描述/全部留言,解析每則「嚴重問題留言」(action `severeCommentBody` 格式)為一條 finding 進 B 逐條修復。 - 新增 **B5**:修復後在議題留言回報進度;全部解決或登記誤報時自動關閉議題(`PATCH state=closed`),仍有待人工處理則只留言不關閉;誤報仍寫入 `exclusions.json`。 - 同步更新 frontmatter description、argument-hint、intro、階段表、參數、commit 分類、總結與呼叫範例。 ### chore(plugin 版本) - `plugin.json`、`.claude-plugin/plugin.json`、`.codex-plugin/plugin.json` 版本號 `0.0.6` → `0.0.7`。 ## 影響範圍 - 僅影響 `code-review-resolve` skill 的問題讀取/寫回行為、新增議題模式,與版本號;不動其他 skill。 - 依決策採「只支援新格式」:舊版頂層陣列 findings 會被視為不合法並回報停止(不向後相容)。 ## 風險與注意事項 - 純文件(SKILL.md)與 manifest 版本號變更,無程式碼執行風險。 - 議題模式與寫入 exclusions 需 `GITEA_TOKEN` 與可解析的 origin repo 座標。
jiantw83 added 2 commits 2026-07-20 06:21:48 +00:00
admin approved these changes 2026-07-20 06:24:15 +00:00
admin merged commit 588f13881e into master 2026-07-20 06:24:17 +00:00
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: plugins/code#10