Public: anyone can read this; the crew can change it.

A repository's forks, labels and webhooks answer `{ items, next_cursor }` #7049

Closed opened this
Closed without merging

This run needed no new change. The branch already carries all of #4843, and nothing is left to push. Routes: /forks, /labels and /hooks answer { items, nextcursor } with limit (default 50, max 200) and a validated cursor.

Notes

stopped closed without shipping deploy 7ed30be

opened this

This run needed no new change. The branch already carries all of #4843, and nothing is left to push.

  • Routes: /forks, /labels and /hooks answer { items, next_cursor } with limit (default 50, max 200) and a validated cursor. A bad limit or cursor is a 422.
  • Cursor behaviour: a cursor whose row is gone is a 422 invalid_cursor on all three. My earlier run had them return an empty page, so that has changed.
  • Unchanged: visibleForks still hides a private fork from a stranger. Hooks are still admin-only and show no secret.
  • Docs and guard: OpenAPI describes the shape, limit, cursor and the refusals. The README says the shape changed. The three routes no longer sit on the bare-array allowlist in test/api-list-shape.test.ts.
  • Tests: the shape guard, list-pages and OpenAPI suites pass (367 tests), and tsc is clean. Tests that need unix sockets or git are skipped here, so the forge's check is what runs them.
  • Not done: I did not touch other lists in src/http/api.ts. I did not look at the #4752 MCP hooks tool the issue flags as a risk; nothing in src/http/mcp.ts reads these three routes.

To try it, call GET /api/v1/repos/:owner/:name/labels?limit=2, then pass the returned next_cursor back as cursor.

Closes #4843

2 earlier comments
commented

This run needed no new change. The branch already carries all of #4843, and nothing is left to push.

  • Routes: /forks, /labels and /hooks answer { items, next_cursor } with limit (default 50, max 200) and a validated cursor. A bad limit or cursor is a 422.
  • Cursor behaviour: a cursor whose row is gone is a 422 invalid_cursor on all three. My earlier run had them return an empty page, so that has changed.
  • Unchanged: visibleForks still hides a private fork from a stranger. Hooks are still admin-only and show no secret.
  • Docs and guard: OpenAPI describes the shape, limit, cursor and the refusals. The README says the shape changed. The three routes no longer sit on the bare-array allowlist in test/api-list-shape.test.ts.
  • Tests: the shape guard, list-pages and OpenAPI suites pass (367 tests), and tsc is clean. Tests that need unix sockets or git are skipped here, so the forge's check is what runs them.
  • Not done: I did not touch other lists in src/http/api.ts. I did not look at the #4752 MCP hooks tool the issue flags as a risk; nothing in src/http/mcp.ts reads these three routes.

To try it, call GET /api/v1/repos/:owner/:name/labels?limit=2, then pass the returned next_cursor back as cursor.

commented

I merged main into the branch and pushed it, which should fix the "does not merge into main" failure. The forge's check has not run on the new push yet.

The only conflict was in src/http/api.ts. main had moved the webhook routes into src/http/api/hooks.ts (hookRoutes). I took that side, and its GET /hooks already pages with limit, cursor and the 422 refusals.

  • Tests: tsc is clean, and 384 tests pass across the list-shape, list-pages, webhooks, forks and OpenAPI suites. Tests that need unix sockets or git are skipped here, so the forge's check is what runs them.
  • Unchanged: /forks, /labels and /hooks answer { items, next_cursor } as before. A stale cursor is a 422 invalid_cursor. Hooks stay admin-only with no secret shown.

To try it, call GET /api/v1/repos/:owner/:name/hooks?limit=2 as an admin and pass the returned next_cursor back as cursor.

commented

Closed by the crew: superseded, its change is already on main in 7cabc472.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs