Repository navigation
fix(github): a paginated devops gh api read sends per_page=100 - #5141
Conversation
A paginated devops gh api read of a REST GET goes through the GitHub session. The session sent the endpoint with no per_page, so GitHub sent pages of 30. session_path now adds per_page=100 when the first per_page of the query has no value, with the rule of gh 2.103.1 (addPerPage in pkg/cmd/api/pagination.go). An endpoint that sets per_page keeps it.
|
Merge gate: the roadmap Service runs this code ( gh rule matched (gh v2.103.1): One branch not copied: gh also appends fail-to-pass: Local checks (after the rebase on b1a798c): Live check, 2026-11-12:
Observed live impact (reported by the operator, not measured in this change): the Service request budget went from a peak of 1918 to 2323 in the hour after the v0.119.0 rollout (limit 4000). |
🤖 I have created a release *beep* *boop* --- ## [0.120.1](v0.120.0...v0.120.1) (2026-11-12) ### Bug Fixes * **github:** a paginated devops gh api read sends per_page=100 ([#5141](#5141)) ([621f24c](621f24c)) * **pr:** pr create fits a repository without openspec ([#5142](#5142)) ([aed68b3](aed68b3)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Since #4737,
devops gh api --paginatereads a REST GET through the GitHub session. The session sent the endpoint with noper_page, so GitHub sent pages of 30, not the pages of 100 that gh reads. A read sent about 3.3 times more requests, the--jqoutput of each page was different from gh, and a listing of more than 3,000 items stopped at the cap of 100 pages.session_pathnow addsper_page=100when the firstper_pageof the query has no value, with the rule of gh 2.103.1 (addPerPageinpkg/cmd/api/pagination.go). An endpoint that setsper_pagekeeps it. The dry-run plan names the same URL.Closes #5100
Change:
openspec/changes/archive/2026-11-12-5100-a-paginated-devops-gh-api-read/