RoadieHQ / roadie-backstage-plugins

All Backstage plugins created by Roadie.
https://roadie.io
Apache License 2.0
280 stars 403 forks source link

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

Closed dzemanov closed 2 months ago

dzemanov commented 2 months ago

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

https://github.com/user-attachments/assets/d9898013-9cd7-4fec-94bf-47955748c1c4

Fixes

1596

:heavy_check_mark: Checklist