feat/inline-critical-comments
develop
每個新的嚴重問題改以行內 review comment 標註在問題所在的檔案與行數上, 留言內容為等級/審查員/建議;無法解析出行號(未標行號或一次列出多個 檔案),或行內留言失敗(該行不在 diff 範圍)時,降級為原本的一般 PR comment。 - gitea.js:新增 postPullReviewComment,呼叫 pull reviews API,以 new_position 對應新版檔案行號、commit_id 帶 PR_HEAD_SHA - comments.js:新增 parseLocation(支援 file:19 / file:70-82,取起始行)與 行內留言內容組裝;postNewCriticalComments 先試行內、失敗降級,deps 可注入 - 補 11 個測試(API payload、parseLocation 各情境、行內成功與兩種降級路徑) - README 更新流程第 7 步說明 app/ 測試 123 pass。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
🔍 服務:gemini 模型:gemini-2.5-flash
postNewCriticalComments
findings
is_new
level === 'critical'
parseLocation
postInline
No dependencies set.
The note is not visible to the blocked user.
🤖 AI Code Review 團隊
🔍 新發現問題(2 筆)
postNewCriticalComments函數新增一個測試案例,驗證當傳入空的findings陣列時,函數能正確執行且不發布任何 comment。這能確保邊界條件的處理是符合預期的。postNewCriticalComments的測試案例主要針對單一 critical finding。建議新增一個測試案例,包含多個is_new且level === 'critical'的 findings,其中一些可以成功發布行內 comment,另一些則因parseLocation失敗或postInline拋出錯誤而降級為一般 comment。這能更全面地驗證迴圈邏輯和多個問題的處理。