Skip to content

fix(api): ensure pagination strictly relies on Link header rel=next and empty list check - #6

Open
aryank97531 wants to merge 1 commit into
EncarnacionP:mainfrom
aryank97531:fix/pagination-link-header
Open

aryank97531 wants to merge 1 commit into
EncarnacionP:mainfrom
aryank97531:fix/pagination-link-header

Conversation

@aryank97531

Copy link
Copy Markdown

Description

Fixes issue #1.

This PR updates the GitHub API client pagination logic in workspace/pkg/github/client.go to ensure pagination does not terminate prematurely when an intermediate page returns fewer items than requested, so long as a Link header with rel="next" is present.

Key Changes

  • Continuous loop relies strictly on parsing Link header for rel="next".
  • Added safety fallback: pagination terminates immediately if an empty list (len(issues) == 0) is returned to prevent potential infinite loops.
  • Passes all existing unit tests, including TestGetIssues_SparsePagination.

/claim #1

@opirebot

opirebot Bot commented Aug 11, 2026

Copy link
Copy Markdown

😅 Unfortunately there are no rewards left to claim in this issue!

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.

1 participant