import-issues reads Forgejo through --api-base !349

merged merged by cmc on 2026-09-08 05:55 UTC · krz/gitbay:codeberg-import into main

Discussion

cmc

Live run for #191 part 1, against codeberg.org/oneprog/ada-judge on a local instance.

Three breaks: the Forgejo comments endpoint ignores page, so the comment loop never ended; the issue list ignores per_page and GitHub's sort/direction, so items arrived newest first and local numbers came out reversed; attribution and the pull-head fetch hard-coded github.com.

The client probes /version once to tell the two apart, then uses limit, sort=oldest, and a single comments read on Forgejo. The site comes from the API base. New e2e test with a Forgejo-shaped fake; the GitHub test now expects attribution to name the API base's site.

Ref #191