Commit 2952daa
fix(backend): stop Gitea/Forgejo pagination on empty page response (#1130)
* fix(backend): stop Gitea/Forgejo pagination on empty page response
When an API token can only see a subset of org repos, the x-total-count
header reports the org total while the token returns fewer items. The
previous loop condition (output.length < totalCount) would never be
satisfied for the visible subset, causing infinite pagination.
Now we break out of the loop when the API returns an empty page,
matching the Gitea API pagination docs recommendation.
Fixes #1108
Co-authored-by: Brendan Kellam <brendan-kellam@users.noreply.github.com>
* chore: add changelog entry for Gitea/Forgejo pagination fix
Co-authored-by: Brendan Kellam <brendan-kellam@users.noreply.github.com>
---------
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Brendan Kellam <brendan-kellam@users.noreply.github.com>1 parent 219fac6 commit 2952daa
2 files changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
257 | 260 | | |
258 | 261 | | |
259 | 262 | | |
| |||
0 commit comments