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

The OpenAPI document describes a repository's reads: branches, commits, contents, labels and milestones #4846

shipped production is serving it opened this has it
opened this

Intent: a harness can read a repository's code and history through OpenAPI alone. Today src/contract/openapi.ts describes issues and pulls, but not branches, commits, contents, labels or milestones.

Done:

  • [ ] rows for GET {REPO}/branches, {REPO}/commits, {REPO}/commits/{oid}, {REPO}/contents (with the query its handler reads: path, ref), {REPO}/labels, {REPO}/milestones and {REPO}/milestones/{number}, placed right after the existing GET {REPO}/pulls row
  • [ ] each row's summary says the answer's shape exactly as the handler answers it today, and whether a private repository needs a token (auth)
  • [ ] test/openapi.test.ts still passes, and a new test asserts each new path and method is in the served document

Other issues add OpenAPI rows in parallel (the app routes, the caller's own routes), so put these exactly where named. If the labels list's shape has changed by then (#4843), describe the new shape.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs