Skip to content

Feat: Paginate getIssues() to fetch all issues#6

Open
mojek wants to merge 1 commit intocasals:masterfrom
mojek:feat/paginate-get-issues
Open

Feat: Paginate getIssues() to fetch all issues#6
mojek wants to merge 1 commit intocasals:masterfrom
mojek:feat/paginate-get-issues

Conversation

@mojek
Copy link
Copy Markdown

@mojek mojek commented Mar 14, 2026

Summary

  • getIssues() was hardcoded to first: 100 with no pagination — workspaces with >100 issues silently missed data during sync
  • Added cursor-based pagination using Linear API's pageInfo { hasNextPage, endCursor } connection pattern
  • Iterates through all pages until hasNextPage is false, accumulating results

Test plan

  • Workspace with >100 issues syncs all issues (not just first 100)
  • Incremental sync (with updatedAfter filter) still works correctly
  • Debug log shows total fetched count: getIssues: fetched X issues total

Previously getIssues() was hardcoded to fetch only the first 100 issues
with no pagination support. Workspaces with more than 100 issues would
silently miss data during sync.

Added cursor-based pagination using Linear API's pageInfo connection
pattern (hasNextPage + endCursor) to iterate through all pages.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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