gh
Minimalistic GitHub API client in R. Contribute to r-lib/gh development by creating an account on GitHub.
gh spent its last two releases making failures and interruptions recoverable.
◆Recent moves
- 25d ago
Pagination progress bar reports true record counts
The pagination progress bar now reports the real record count an endpoint holds even when .limit is set to a large finite value. A display fix on the pagination work from 1.6.0.
View source ↗ - 2mo ago
Interrupted pagination keeps its partial results
Interrupting a paginated call now raises a classed gh_interrupt carrying the records fetched so far, token format validation warns instead of erroring, 304 Not Modified responses are handled properly, and a fake_github_app() webfakes server ships for testing. All of it makes partial and unusual outcomes recoverable.
View source ↗ - 1y ago
Response headers dropped from results after a security advisory
⚡ SPARKA security advisory drives a breaking change: response headers are no longer retained in returned objects, so gh_next() and friends need the token and headers passed again. The same release adds an httr2-backed on-disk cache and Posit Connect credential pickup.
View source ↗ - 2y ago
Pagination helpers repaired and atomic file writes
Repairs the gh_next(), gh_prev(), gh_first() and gh_last() helpers, and makes .destfile writes go to a temporary file renamed on success or deleted on error.
View source ↗ - 3y ago
Client rebuilt on httr2 with rate-limit controls
The engine swap: gh moves onto httr2, gaining .max_rate and .max_wait controls, a gh_rate_limits() report and fine-grained token validation. It sets up the caching and header behaviour that 1.5.0 and 1.6.0 then adjust.
View source ↗ - 3y ago
Lower-case methods and richer error conditions
Accepts lower-case HTTP methods and returns response headers and content in error conditions so handlers can read rate-limit resets. A small ergonomics release.
View source ↗