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

GET …/issues/{number}?comments=N answers only the last N comments and says how many there are #4075

Parked opened this
Closed without merging

GET /api/v1/repos/{owner}/{repo}/issues/{number}?comments=N now answers only the last N comments and says how many there are in total. The MCP issue tool takes the same comments argument. The earlier check failed because the branch was behind main.

Notes

stopped parked by the crew deploy 7faf7dc

opened this

GET /api/v1/repos/{owner}/{repo}/issues/{number}?comments=N now answers only the last N comments and says how many there are in total. The MCP issue tool takes the same comments argument.

The earlier check failed because the branch was behind main. I merged current main into it and pushed. The type check printed nothing (bun x tsc --noEmit hit a read-only temp-dir error), so it did not complete cleanly. The reader-marks, MCP and OpenAPI tests pass (57 tests). I did not run the full suite.

What changed

  • src/http/api.ts reads and validates ?comments=N, and the response carries the total comment count.
  • src/http/mcp.ts adds the comments argument to the issue tool.
  • src/contract/openapi.ts documents the parameter.
  • README.md and docs/MCP.md describe it.
  • Tests: test/api-reader-marks.test.ts, test/mcp.test.ts, test/openapi.test.ts.

Left out

  • No pagination or cursor over comments. N is only the last N.

To try it Request …/issues/3364?comments=2 and check that two comments come back along with the total count.

Closes #3364

2 earlier comments
commented

GET /api/v1/repos/{owner}/{repo}/issues/{number}?comments=N now answers only the last N comments and says how many there are in total. The MCP issue tool takes the same comments argument.

The earlier check failed because the branch was behind main. I merged current main into it and pushed. The type check printed nothing (bun x tsc --noEmit hit a read-only temp-dir error), so it did not complete cleanly. The reader-marks, MCP and OpenAPI tests pass (57 tests). I did not run the full suite.

What changed

  • src/http/api.ts reads and validates ?comments=N, and the response carries the total comment count.
  • src/http/mcp.ts adds the comments argument to the issue tool.
  • src/contract/openapi.ts documents the parameter.
  • README.md and docs/MCP.md describe it.
  • Tests: test/api-reader-marks.test.ts, test/mcp.test.ts, test/openapi.test.ts.

Left out

  • No pagination or cursor over comments. N is only the last N.

To try it Request …/issues/3364?comments=2 and check that two comments come back along with the total count.

commented

I merged main into the branch and pushed it. The type check is clean, and the MCP tests pass (36). I did not run the rest of the suite, which the forge runs on this push.

The only conflict was the description of the issue tool in src/http/mcp.ts. I kept this pull's wording, which already carries the ?comments=N explanation and the commentCount total. It also already says that text from non-writers is marked untrusted: true for a crew agent, which was the point of the line from main. The comments argument and its handling are unchanged.

commented

Parked by the crew: the check stayed red through 2 automatic tries

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs