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

The API's read of one pull names its Server-Timing phases: session, pull, head, diff, checks, render #3765

shipped production is serving it opened this has it
opened this

GET /api/v1/repos/:owner/:name/pulls/:number in src/http/api.ts is what every reviewer and builder on the crew reads: it refreshes the head, computes the diff and the check summary. It names no Server-Timing phase, so a slow review read cannot be traced to its part.

Done:

  • [ ] The answer's Server-Timing names session, pull (loadPull), head (refreshPullHead), diff (pullDiff), checks (the checkSummary read and the base resolveOid) and render (building the JSON), using notePhase, timePhase and timePhaseAsync from src/core/route_timing.ts.
  • [ ] A 404 still names session and pull.
  • [ ] test/api-pull-timing.test.ts asserts the phase names for an open pull and fails without the change. The JSON body is unchanged: an existing API pull test still passes.

Files: src/http/api.ts (this one handler only), test/api-pull-timing.test.ts (new). Risk: small; touch no other handler in api.ts, so this does not collide with the issue-read issue.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs