forgejo/services/migrations/testdata/github/pagination
Nils Goroll 01fbb1499f fix: migrations/github: avoid getting the first issues page twice (#10798)
For the previous code with the Page attribute present in
ListCursorOptions for page 1, github would not return an "After" cursor,
such that the request for page 2 would request what effectively is the
content of page 1 a second time.

This would lead to an attempt to insert the same issues twice.

Note that this is not the only reason why this can happen with the
current code base.

We fix this particular issue by not using the Page attribute so github
does return an "After" cursor.

Fixes #10794

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/10798
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Nils Goroll <nils.goroll@uplex.de>
Co-committed-by: Nils Goroll <nils.goroll@uplex.de>
2026-01-26 15:00:35 +01:00
..
GET_%2Frate_limit fix: migrations/github: avoid getting the first issues page twice (#10798) 2026-01-26 15:00:35 +01:00
GET_%2Frepos%2Fnigoroll%2Flibvmod-dynamic fix: migrations/github: avoid getting the first issues page twice (#10798) 2026-01-26 15:00:35 +01:00
GET_%2Frepos%2Fnigoroll%2Flibvmod-dynamic%2Fissues%3Fafter=Y3Vyc29yOnYyOpLPAAABaaHKpHDOGUReFQ%253D%253D&direction=asc&per_page=45&sort=created&state=all fix: migrations/github: avoid getting the first issues page twice (#10798) 2026-01-26 15:00:35 +01:00
GET_%2Frepos%2Fnigoroll%2Flibvmod-dynamic%2Fissues%3Fafter=Y3Vyc29yOnYyOpLPAAABgogj3SDOT44Tug%253D%253D&direction=asc&per_page=45&sort=created&state=all fix: migrations/github: avoid getting the first issues page twice (#10798) 2026-01-26 15:00:35 +01:00
GET_%2Frepos%2Fnigoroll%2Flibvmod-dynamic%2Fissues%3Fafter=Y3Vyc29yOnYyOpLPAAABmqckTzDO2bC8uw%253D%253D&direction=asc&per_page=45&sort=created&state=all fix: migrations/github: avoid getting the first issues page twice (#10798) 2026-01-26 15:00:35 +01:00
GET_%2Frepos%2Fnigoroll%2Flibvmod-dynamic%2Fissues%3Fdirection=asc&per_page=45&sort=created&state=all fix: migrations/github: avoid getting the first issues page twice (#10798) 2026-01-26 15:00:35 +01:00