Skip to content

Commit 5497d7e

Browse files
committed
📝 Document GitHub search pagination rate limits (#815)
1 parent 6d031ad commit 5497d7e

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

‎packages/git/src/composition/components.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,9 +335,12 @@ To read another page, repeat the search with an explicit `page` and the same
335335
Set `paginate={true}` to follow GitHub's next-page links. `page` selects the
336336
starting page and `perPage` applies to each request. The binding is an
337337
ordered array of GitHub response objects, even when only one page is available.
338+
GitHub's authenticated search limit is 30 requests per minute. A rate-limited
339+
page fails the whole read. `perPage={100}` covers the accessible window in at
340+
most ten requests. [GitHub REST search rate limits](https://docs.github.com/en/rest/search/search#rate-limit)
338341

339342
```mdx
340-
<GitHub.Search query="is:pr is:open label:bug" sort="created" paginate={true} as="pages" />
343+
<GitHub.Search query="is:pr is:open label:bug" sort="created" perPage={100} paginate={true} as="pages" />
341344
<Query value={pages} yq="[.[].items[].html_url]" as="pullRequestUrls" />
342345
```
343346

‎specs/workflow-workspace-spec.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2377,7 +2377,9 @@ a one-element array when the starting page is the only page fetched.
23772377

23782378
Both forms preserve item order and all provider JSON fields, including
23792379
`total_count`, `incomplete_results`, nullable fields and unfamiliar members.
2380-
Transport headers and credentials stay with the adapter. Authentication and
2380+
Transport headers and credentials stay with the adapter.
2381+
GitHub applies its search rate limits to every request. A rate-limited page
2382+
fails the entire read without a retry or a wait for the budget to reset. Authentication and
23812383
transport failures, malformed responses, and items from a different
23822384
repository or of a different kind fail the entire read. A valid incomplete
23832385
page binds its original incompleteness indicator. Cancellation stops the

0 commit comments

Comments
 (0)