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

Issues: a route to assign an issue to a person or an agent #18285

opened this in answer to

Its check is red, 20h 5m ago

check failed: 1 of 2244 tests — "listing issues and pulls is described with the query the handlers read"

Issues can now be filed already assigned and listed by assignee. Most of what the issue asks for was already on main, and I left the "Done when" step undone (details below). Already on main, so I didn't rebuild it: PUT /api/v1/repos/:owner/:name/issues/:number/assignee assigns or unassigns, with null to clear.

Notes · 11 files · +144 −12

Look

8 pages beside main · 0 new to this pull

/apps

main

at f698c54 ·

this pull

In the dark

main

at f698c54 ·

this pull

at 5693c75 ·

/changelog

main

at f698c54 ·

this pull

In the dark

main

at f698c54 ·

this pull

at 5693c75 ·

/explore

main

at f698c54 ·

this pull

In the dark

main

at f698c54 ·

this pull

at 5693c75 ·

/looks/failed

main

at f698c54 ·

this pull

In the dark

main

at f698c54 ·

this pull

at 5693c75 ·

/looks/missing

main

at f698c54 ·

this pull

In the dark

main

at f698c54 ·

this pull

at 5693c75 ·

/notes

main

at f698c54 ·

this pull

In the dark

main

at f698c54 ·

this pull

at 5693c75 ·

/review

main

at f698c54 ·

this pull

In the dark

main

at f698c54 ·

this pull

at 5693c75 ·

/security

main

at f698c54 ·

this pull

In the dark

main

at f698c54 ·

this pull

at 5693c75 ·

opened this

Issues can now be filed already assigned and listed by assignee. Most of what the issue asks for was already on main, and I left the "Done when" step undone (details below).

Already on main, so I didn't rebuild it:

  • PUT /api/v1/repos/:owner/:name/issues/:number/assignee assigns or unassigns, with null to clear. It runs the assignIssue permission check and is in openapi.json.
  • POST …/issues is in openapi.json too, with a title and body.
  • The issue page, the MCP assign and assigned tools, and the terminal assign picker already existed.
  • GET /api/v1/user/assigned is already a cross-repository "assigned to me" list. I pointed the how-to at it.

What I added:

  • POST …/issues takes assignee (a username, or null or left out for nobody), and it is in the contract.
    • A non-string or unknown name is refused with 422 (invalid_assignee or no_such_user) before anything is filed.
    • The assignment runs through assignIssue, so it has the same permission check as the PUT route.
    • If that check refuses, the issue is still filed and the 201 carries assignRefused with the code. Say if you'd rather it be an error.
  • GET …/issues?assignee=<username> filters the list, and assignee=me is the caller's own, answering 401 when signed out. It is in the contract and in the accepted-parameters list. I updated test/api-list-query.test.ts for that list, because its expectation was out of date.
  • The MCP issues tool takes assignee, with me too.
  • In the terminal's issue list, o toggles "assigned to me", shown as an assignee:me chip.
  • docs/features/api-list-filters.md documents all of it.
  • test/api-issue-assignee.test.ts covers assignment at creation, the refusals (nothing filed), me, a named filter, and the signed-out 401.

tsc, design-lint, the gate, test/mcp-size.test.ts and the targeted API, OpenAPI and MCP tests pass. I did not run the full suite or test/doorless.test.ts, so the forge's full check is the first run of those. It is pushed.

Not done:

  • Assigning forge-apple #75 to #82 to trevato, and adding the query to ForgeClient.yourList() in ForgeKit. Those are in another repository that my token can't reach. Once this lands, a person or the Apple session can use PUT …/assignee or ?assignee=me.
  • A mirrored origin's issue list shows none for assignee, since its summaries carry no assignee.
  • Pulls don't take the new assignee list filter. They still have the existing assignee PUT.

Try it: GET /api/v1/repos/trevato/forge/issues?assignee=me with a token, or press o on the terminal's issue list.

Reused: assignIssue and listIssues' existing assignee option. No new dependency.

Closes #18256

commented

Issues can now be filed already assigned and listed by assignee. Most of what the issue asks for was already on main, and I left the "Done when" step undone (details below).

Already on main, so I didn't rebuild it:

  • PUT /api/v1/repos/:owner/:name/issues/:number/assignee assigns or unassigns, with null to clear. It runs the assignIssue permission check and is in openapi.json.
  • POST …/issues is in openapi.json too, with a title and body.
  • The issue page, the MCP assign and assigned tools, and the terminal assign picker already existed.
  • GET /api/v1/user/assigned is already a cross-repository "assigned to me" list. I pointed the how-to at it.

What I added:

  • POST …/issues takes assignee (a username, or null or left out for nobody), and it is in the contract.
    • A non-string or unknown name is refused with 422 (invalid_assignee or no_such_user) before anything is filed.
    • The assignment runs through assignIssue, so it has the same permission check as the PUT route.
    • If that check refuses, the issue is still filed and the 201 carries assignRefused with the code. Say if you'd rather it be an error.
  • GET …/issues?assignee=<username> filters the list, and assignee=me is the caller's own, answering 401 when signed out. It is in the contract and in the accepted-parameters list. I updated test/api-list-query.test.ts for that list, because its expectation was out of date.
  • The MCP issues tool takes assignee, with me too.
  • In the terminal's issue list, o toggles "assigned to me", shown as an assignee:me chip.
  • docs/features/api-list-filters.md documents all of it.
  • test/api-issue-assignee.test.ts covers assignment at creation, the refusals (nothing filed), me, a named filter, and the signed-out 401.

tsc, design-lint, the gate, test/mcp-size.test.ts and the targeted API, OpenAPI and MCP tests pass. I did not run the full suite or test/doorless.test.ts, so the forge's full check is the first run of those. It is pushed.

Not done:

  • Assigning forge-apple #75 to #82 to trevato, and adding the query to ForgeClient.yourList() in ForgeKit. Those are in another repository that my token can't reach. Once this lands, a person or the Apple session can use PUT …/assignee or ?assignee=me.
  • A mirrored origin's issue list shows none for assignee, since its summaries carry no assignee.
  • Pulls don't take the new assignee list filter. They still have the existing assignee PUT.

Try it: GET /api/v1/repos/trevato/forge/issues?assignee=me with a token, or press o on the terminal's issue list.

Reused: assignIssue and listIssues' existing assignee option. No new dependency.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs