Skip to content

#1678: advance cursor when search returns empty results#1758

Open
VasilevNStas wants to merge 1 commit into
zerocracy:masterfrom
VasilevNStas:1678-cursor-stuck-empty-results
Open

#1678: advance cursor when search returns empty results#1758
VasilevNStas wants to merge 1 commit into
zerocracy:masterfrom
VasilevNStas:1678-cursor-stuck-empty-results

Conversation

@VasilevNStas

@VasilevNStas VasilevNStas commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

When GitHub Search API returns an empty page of results, the cursor (issue) doesn't advance and the loop spins forever on the same empty page.

Added issue += 1 if seen.empty? && issue <= first to increment the cursor when no results are returned, ensuring forward progress.

Closes #1678

When the search query (QoS or GitHub API) returns no items for the
current cursor position, increment the cursor by 1 to avoid getting
stuck on the same value and entering an infinite loop.
@VasilevNStas

Copy link
Copy Markdown
Contributor Author

@yegor256 please review

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.

find-all-issues.rb cursor never advances on empty results (potential infinite loop)

1 participant