Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(github-pull-requests): introduce max 1000 item paging #1611

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

dzemanov
Copy link
Contributor

Description

GitHub Search API has limit of max 1000 results.
This causes 422 errors when the search returns more than 1000 items.

{
  "message": "Only the first 1000 search results are available",
  "documentation_url": "https://docs.github.com/v3/search/",
  "status": "422"
}

Modifications

Restrict pagination to a maximum of 1000 items. Show users when additional results are available, suggesting in a tooltip that they can refine their query to retrieve more specific results.

Before:
Screenshot from 2024-09-11 15-21-54

After:
Screenshot from 2024-09-11 17-19-07

demo.mp4

Fixes

#1596

✔️ Checklist

  • Added tests for new functionality and regression tests for bug fixes
  • Added changeset (run yarn changeset in the root)
  • Screenshots of before and after attached (for UI changes)
  • Added or updated documentation (if applicable)

@dzemanov dzemanov requested a review from a team as a code owner September 11, 2024 15:59
@dzemanov dzemanov force-pushed the fix-github-pull-requests-paging branch from 0547249 to 2b7f83f Compare September 11, 2024 16:17
@Xantier Xantier merged commit abe24d7 into RoadieHQ:main Sep 12, 2024
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