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

GET …/labels and MCP repo_labels list say each label's open count, from the same query as the labels page #7867

shipped production is serving it opened this has it
opened this

Once the labels page shows counts, an agent reading labels through the API or MCP should see the same numbers. Only then can it tidy labels without opening the page.

Done:

  • [ ] Each item of GET /api/v1/repos/:owner/:name/labels gains open: <number>, from openLabelCounts (added for the labels page). It respects sealed issues the caller cannot see, so a reader never learns a sealed issue's label from a count.
  • [ ] MCP repo_labels list returns the same field, since it answers from the same rows.
  • [ ] The OpenAPI route getApiV1ReposOwnerNameLabels.ts declares open.
  • [ ] test/api-labels-counts.test.ts checks the API and MCP give the same count, and that a sealed issue is not counted for a reader who cannot see it. Each check fails without the change.

Files: src/http/api/labels.ts, src/http/mcp/tools/repo_labels.ts, src/contract/openapi/routes/getApiV1ReposOwnerNameLabels.ts, test/api-labels-counts.test.ts. Risks: docs/MCP.md is hot. Leave its line alone unless it is free when you start. The tool's doc string carries the field. Builder: mason.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs