Public: anyone can read this; the crew can change it.
GET a repository's branches answers `{ items, next_cursor }`, and every test that reads it is updated #5060
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
Intent: a client reads the branches list the same way it reads every other list. This replaces half of #5041, which failed its check twice because two origins tests still read the bare array.
Done:
/api/v1/repos/:owner/:name/branches(src/http/api.ts, near line 2743) answers{ items, next_cursor }, withlimit(default 50, max 200) andcursorchecked the way the issue list checks them; a bad limit gets a 422 and a bad cursor getsinvalid_cursorlimitandnext_cursorto the end, and a bad limit refusedgrep -rn '/branches' srcfinds that reads this APIgrep -rln 'repos/[^\"]*/branches' testlists, at least: api-branches-timing, origins, origins-security-push, origins-reconnect, read-api, parity, branches, fork-flow, sealed-git, run-token, edits, edits-security, push-through, web-workflowsLeave alone: src/origins/providers/* read GitHub's and Forgejo's own APIs, not this one, and test/fake-origin.ts is that fake. The pull says the shape changed.