Skip to content

#1684: add pagination to resolved_conversations GraphQL query#1822

Merged
yegor256 merged 1 commit into
zerocracy:masterfrom
VasilevNStas:1684-resolved-pagination
Jul 8, 2026
Merged

#1684: add pagination to resolved_conversations GraphQL query#1822
yegor256 merged 1 commit into
zerocracy:masterfrom
VasilevNStas:1684-resolved-pagination

Conversation

@VasilevNStas

Copy link
Copy Markdown
Contributor

Closes #1684

Fbe.github_graph.resolved_conversations uses reviewThreads(first: 100) without pagination, missing PRs with >100 resolved conversations.

Fix: replace the non-paginated call with a direct Fbe.github_graph.query(...) that loops through all pages using cursor-based pagination (hasNextPage / endCursor). The query fetches only isResolved + pageInfo, keeping it lightweight.

Same error handling (GraphQL::Client::Error, Octokit::NotFound/Deprecated/Forbidden) is preserved.

@VasilevNStas VasilevNStas force-pushed the 1684-resolved-pagination branch from 6e8c307 to 0202eea Compare July 4, 2026 15:58
@VasilevNStas

Copy link
Copy Markdown
Contributor Author

@yegor256 plz review

@yegor256

yegor256 commented Jul 8, 2026

Copy link
Copy Markdown
Member

@VasilevNStas merge conflicts here

@VasilevNStas VasilevNStas force-pushed the 1684-resolved-pagination branch from 0202eea to ad3e21e Compare July 8, 2026 10:24
@VasilevNStas

VasilevNStas commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

@yegor256

Sorry, the conflict was between the if Fbe.github_graph guard (already merged to master via #1825) and the pagination rewrite. Resolved by combining both — the paginated query is now wrapped with the nil guard. Apologies for the oversight.

@yegor256 yegor256 merged commit c6fe3d5 into zerocracy:master Jul 8, 2026
13 checks passed
@0crat

0crat commented Jul 10, 2026

Copy link
Copy Markdown

@VasilevNStas Thanks for the contribution! You've earned +24 points. Please, keep them coming. Your running score is +3152; don't forget to check your Zerocracy account too).

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.

lib/pull_request.rb comments_resolved no pagination

3 participants