feat/gitea-comment-pagination/main
master
修正 Gitea 議題留言跨頁讀取,改由 timeline 取得完整留言集合。
需求議題未能由工作包抽取契約帶出;本變更直接處理工作包 #74 指定的 Gitea 留言讀取問題。
#74 [工作包 G] Gitea 留言跨頁讀取
listIssueComments
/issues/{index}/timeline
comment
沿用既有 pages 分頁與 HTTP 錯誤契約;只把 timeline 的 comment 事件交給既有留言處理,保留 reaction、留言驗證與 PR review timeline 的既有規則。
pages
Gitea 議題 comments 端點無法可靠套用預期的 page/limit,超過 50 則時會遺失留言。Timeline 分頁可取得完整事件集合,並避免跨頁重複事件造成未處理數誤計。
issue extract、work package extract、comments merge、PR comments、PR reply、PR watch。
node --test test/issue-extract.test.js test/comments-merge.test.js test/pr-comments.test.js test/pr-reply.test.js test/pr-watch.test.js
npm test
test/bin-entry.test.js
/repos/plugins/tea-sdlc/issues/74/timeline?page=1&limit=1
/comments
Gitea 議題留言端點無法可靠處理分頁;改由 timeline 逐頁篩選 comment 事件並去重,讓抽取、整併與 PR 留言流程取得完整集合。
留言共用 iterator 已改走 timeline,預覽只列一次該端點,避免把端點種類誤報成重複請求。
No dependencies set.
The note is not visible to the blocked user.
摘要
修正 Gitea 議題留言跨頁讀取,改由 timeline 取得完整留言集合。
需求議題
需求議題未能由工作包抽取契約帶出;本變更直接處理工作包 #74 指定的 Gitea 留言讀取問題。
工作包議題
#74 [工作包 G] Gitea 留言跨頁讀取
變更內容
listIssueComments改讀/issues/{index}/timeline,逐頁篩選comment事件並以留言 id 去重。設計重點
沿用既有
pages分頁與 HTTP 錯誤契約;只把 timeline 的comment事件交給既有留言處理,保留 reaction、留言驗證與 PR review timeline 的既有規則。解決的問題
Gitea 議題 comments 端點無法可靠套用預期的 page/limit,超過 50 則時會遺失留言。Timeline 分頁可取得完整事件集合,並避免跨頁重複事件造成未處理數誤計。
影響的功能
issue extract、work package extract、comments merge、PR comments、PR reply、PR watch。
測試結果
node --test test/issue-extract.test.js test/comments-merge.test.js test/pr-comments.test.js test/pr-reply.test.js test/pr-watch.test.js:111 passed, 0 failed。npm test:541 passed, 1 failed;唯一失敗為既有test/bin-entry.test.js依賴 npm pack JSON 陣列格式,現行 npm 回傳物件,與本次留言變更無關。/repos/plugins/tea-sdlc/issues/74/timeline?page=1&limit=1回傳分頁事件;同參數的/comments回傳空集合。