Skip to content

feat(github): show total page count in pagination logs#7

Merged
vincentkoc merged 1 commit intoopenclaw:mainfrom
RomneyDa:better-progress
May 1, 2026
Merged

feat(github): show total page count in pagination logs#7
vincentkoc merged 1 commit intoopenclaw:mainfrom
RomneyDa:better-progress

Conversation

@RomneyDa
Copy link
Copy Markdown
Contributor

@RomneyDa RomneyDa commented May 1, 2026

Summary

Pagination progress logs now show the total page count when known:

[github] page 3/7 fetched count=100 accumulated=300

Screenshot:
image

  • Parses rel="last" from the GitHub Link header (used by offset-paginated endpoints like comments / reviews).
  • Repository issues use cursor pagination and don't advertise rel="last", so the syncer seeds the total from open_issues_count returned by the prior GetRepo call. The hint is suppressed when filters (state != open, a since cutoff) would make the count misleading, and the displayed total is bumped if the actual page count exceeds the hint.
  • Falls back to the original page X format when no total is known.

Test plan

  • go test ./...

@RomneyDa RomneyDa marked this pull request as draft May 1, 2026 03:07
Parses rel="last" from the Link header, and for the cursor-paginated
issues listing falls back to open_issues_count from the prior GetRepo
response. Logs read "page 3/7 fetched count=100 accumulated=300" when a
total is known and remain "page 3 ..." otherwise.
@RomneyDa RomneyDa force-pushed the better-progress branch from 1ee3861 to 2e601ed Compare May 1, 2026 03:12
@RomneyDa RomneyDa marked this pull request as ready for review May 1, 2026 03:14
@vincentkoc vincentkoc merged commit fbc807c into openclaw:main May 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants