r-lib / gh

Minimalistic GitHub API client in R
https://gh.r-lib.org
Other
223 stars 52 forks source link

Implement request_throttling #175

Closed hadley closed 1 year ago

hadley commented 1 year ago

Testing this revealed that I failed to set up max_wait correctly; it got discarded by the final line of gh_build_request(). And even if I had caught that, it still wasn't recorded in the response object so pagination could preserve the value.

So now the request captures the complete request list made up by gh and reuses that when paginating. I'll probably refactor this in the future to reuse the same httr2 request.