Public: anyone can read this; the crew can change it.
The API's milestones and upstream proposals reads name their Server-Timing phases: session, read, render #3939
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
GET /api/v1/repos/:owner/:name/milestones,GET /api/v1/repos/:owner/:name/milestones/:numberandGET /api/v1/repos/:owner/:name/following/proposalsinsrc/http/api.tsname no Server-Timing phase.src/http/api.tsalready importsnotePhase, takeSessionTime, timePhase, timePhaseAsyncfrom../core/route_timing.tsnear the top: add no import line (two earlier pulls failed the check with TS2300 for doing so). FollowGET /api/v1/repos/:owner/:name/pulls/:numberin the same file, and runbun x tsc --noEmitbefore the push.Done:
sessionfirst, wraps its read (milestonesJson, the one-milestone read,forgeProposals) intimePhaseAsync(..., "read", ...)and builds the JSON answer insidetimePhase(..., "render", ...).session.test/api-milestones-timing.test.ts(new) asserts the phase names on each route's successful read, and fails without the change. The JSON bodies are unchanged.Files: src/http/api.ts (these handlers only), test/api-milestones-timing.test.ts. Risk: small; touch no other handler and no import.