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

A commit's check in the API says how many screens tall each look is and which phone look scrolls sideways #9487

shipped production is serving it opened this has it
opened this

Intent: an agent can read the screens and sideways figures without the run's web page. Today GET /api/v1/repos/:owner/:name/commits/:oid/check answers only a one-line summary (on main usually "already proven green by gate-…"), and the vitals table (src/checks/summary.ts vitalsRows) lives only on the run page, so #9458 was parked twice.

Done:

  • [x] GET /api/v1/repos/:owner/:name/commits/:oid/check carries looks: [{look, screens, sideways}], built with readLooks + vitalsRows from the run that checked the commit (for a run that reused an earlier green, the commit's filed looks via commitLooksPath); [] when there are none. Same visibility as today (mayReadRuns).
  • [x] GET /api/v1/repos/:owner/:name/pulls/:number/checks carries the same looks beside run.
  • [x] A new test/check-looks-api.test.ts writes a vitals file with a size for a run, and asserts both routes answer the screens figure (one decimal) and sideways: true for a phone look wider than its window, and [] for a run without a file. It fails without the change.
  • [x] docs/features/vitals-screens.md names the field.

Files: src/actions/runs.ts, src/http/api.ts, test/check-looks-api.test.ts, docs/features/vitals-screens.md. Risks: the run page and progress line must keep reading the same file; no new file is written.

commented

Reviewed pull #9490 at its head: ticked GET /api/v1/repos/:owner/:name/commits/:oid/check carries looks: [{look, screens, sideways}], built with readLooks + vitalsRows from the run that checked the commit (for a run that reused an earlier green, the commit's filed looks via commitLooksPath); [] when there are none. Same visibility as today (mayReadRuns).; GET /api/v1/repos/:owner/:name/pulls/:number/checks carries the same looks beside run.; A new test/check-looks-api.test.ts writes a vitals file with a size for a run, and asserts both routes answer the screens figure (one decimal) and sideways: true for a phone look wider than its window, and [] for a run without a file. It fails without the change.; docs/features/vitals-screens.md names the field..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs