fix(留言分頁): 改用 timeline 分頁讀取留言
Gitea 議題留言端點無法可靠處理分頁;改由 timeline 逐頁篩選 comment 事件並去重,讓抽取、整併與 PR 留言流程取得完整集合。
This commit is contained in:
@@ -31,16 +31,15 @@ main(async () => {
|
||||
const repo = parseRepo(flags.repo);
|
||||
const index = parseIndex(flags.index);
|
||||
const issuePath = `/repos/${repo}/issues/${index}`;
|
||||
const commentsPath = `${issuePath}/comments`;
|
||||
const timelinePath = `${issuePath}/timeline`;
|
||||
|
||||
if (flags['dry-run']) {
|
||||
return {
|
||||
dryRun: true,
|
||||
repo,
|
||||
index,
|
||||
requests: [
|
||||
{ method: 'GET', path: issuePath },
|
||||
{ method: 'GET', path: commentsPath },
|
||||
{ method: 'GET', path: timelinePath },
|
||||
],
|
||||
note: UNMERGED_COMMENT_NOTE,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user