Files
gitea/services
03058691c3 fix(migrations): stop endless comment paging when migrating from Gitea (#39419)
`GET /repos/{owner}/{repo}/issues/{index}/comments` ignores `page` and
`limit` and always returns every comment. The Gitea downloader pages it
and stops only on a short page, so migrating from Gitea or Forgejo loops
forever on any issue with at least `MAX_RESPONSE_ITEMS` comments,
without an error.

Paging is kept in case the endpoint gets paginated
(https://github.com/go-gitea/gitea/issues/6132,
https://github.com/go-gitea/gitea/issues/18082). The loop now stops when
a page is longer than the limit or starts with an already seen comment.

Prior art: Forgejo fixed its copy in
https://codeberg.org/forgejo/forgejo/pulls/9274 (report:
https://codeberg.org/Codeberg/Community/issues/1542).

---
AI-assisted: drafted with Claude Code (claude-opus-5-5), reviewed by me.

Please let me know if you have any suggestions or comments, I ran into
this issue myself when I was trying to migrate repositories from Forgejo
-> Gitea.

---------

Co-authored-by: silverwind <me@silverwind.io>
2026-09-25 01:23:50 +00:00
..
2026-09-12 08:15:23 +00:00
2026-09-12 08:15:23 +00:00
2026-09-12 08:15:23 +00:00
2026-09-23 23:14:31 +00:00
2026-09-12 16:26:20 +00:00
2026-09-23 23:14:31 +00:00
2026-08-26 19:32:44 +00:00
2026-09-12 08:15:23 +00:00
2026-09-12 08:15:23 +00:00
2026-09-12 08:15:23 +00:00