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

`GET …/app/pulls` lists an adapter's recorded pull runs, newest first #10101

shipped production is serving it opened this has it
opened this

For: docs/ADAPTERS.md says no page or API reads the pull_run rows yet; an owner trusting a sync must be able to see each one.

Done looks like:

  • [x] GET /api/v1/repos/:owner/:name/app/pulls answers the app's last pull runs, newest first (limit 1–100, default 20): when, how long, good or failed, the error sentence when failed, records written and the cursor after. Readers of the repository only; 404 otherwise.
  • [x] Rows are read through one function in src/apps/pull.ts (plain data out), so a page and MCP can reuse it.
  • [x] The route is in the OpenAPI description (src/contract/openapi/routes/).
  • [x] A test records a good and a failed run and reads both back in order, and proves a stranger gets 404.
  • [x] docs/ADAPTERS.md's Status says the API reads them.

Files: src/apps/pull.ts, src/http/api (a small module), src/contract/openapi/routes, docs/ADAPTERS.md, test/adapter-pulls-api.test.ts. Risk: #10037 (page) and #10084 (run now) are in flight in the same area; keep to a new read function.

commented

Reviewed pull #10112 at its head: ticked GET /api/v1/repos/:owner/:name/app/pulls answers the app's last pull runs, newest first (limit 1–100, default 20): when, how long, good or failed, the error sentence when failed, records written and the cursor after. Readers of the repository only; 404 otherwise.; Rows are read through one function in src/apps/pull.ts (plain data out), so a page and MCP can reuse it.; The route is in the OpenAPI description (src/contract/openapi/routes/).; A test records a good and a failed run and reads both back in order, and proves a stranger gets 404.; docs/ADAPTERS.md's Status says the API reads them..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs