|
| 1 | +## Summary |
| 2 | +Adds Issues 2.0 custom field values (Priority, Visibility, Impact, etc.) to each issue returned by `list_issues`, exposed on `MinimalIssue` as `field_values: [{field, value}]`. |
| 3 | + |
| 4 | +## Why |
| 5 | +Issues 2.0 introduced custom fields (single-select, number, text, date) that are core to how teams triage and prioritise. Without them in the MCP response, an agent can list issues but has no way to see — or reason about — the values teams actually filter and sort by in the GitHub UI. |
| 6 | + |
| 7 | +Fixes # |
| 8 | + |
| 9 | +## What changed |
| 10 | +- `IssueFragment` now selects `issueFieldValues(first: 25)` (matches monolith `IssueField::ORGANIZATION_ISSUE_FIELDS_LIMIT`). |
| 11 | +- New `IssueFieldRef` type with a `Name()` method, resolving the field name across the 4-variant `IssueFields` union. |
| 12 | +- New `IssueFieldValueFragment` union fragment over `IssueFieldDate|Number|SingleSelect|Text Value`. |
| 13 | +- `MinimalIssue` gains `FieldValues []MinimalIssueFieldValue` (`omitempty`); each entry carries `field`, `value`, and a forward-compat `values []string` for the upcoming `IssueFieldMultiSelectValue` (see github/github#430793). |
| 14 | +- `fragmentToMinimalIssueFieldValue` converts the fragment to the minimal shape. |
| 15 | +- Tests cover both label-filtered and non-label-filtered query variants. |
| 16 | + |
| 17 | +### Live validation |
| 18 | +Smoke-tested against production github.com via a local build of this server, against `github/issues`: |
| 19 | + |
| 20 | +```json |
| 21 | +{ "number": 21640, "field_values": [ |
| 22 | + {"field":"Priority","value":"P2"}, |
| 23 | + {"field":"Visibility","value":"Medium"}, |
| 24 | + {"field":"Impact","value":"Medium"}, |
| 25 | + {"field":"Effort","value":"Medium"} |
| 26 | +]} |
| 27 | +``` |
| 28 | + |
| 29 | +## MCP impact |
| 30 | +- [ ] No tool or API changes |
| 31 | +- [x] Tool schema or behavior changed |
| 32 | + - `list_issues` response now includes an optional `field_values` array per issue. Additive only, omitted for issues without custom field values, so existing consumers aren't broken. |
| 33 | +- [ ] New tool added |
| 34 | + |
| 35 | +## Prompts tested (tool changes only) |
| 36 | +- "List the open issues in `github/issues` and tell me which ones are P1." — agent can now answer from the response without follow-up tool calls. |
| 37 | +- "What's the priority breakdown of open issues in `github/issues`?" |
| 38 | + |
| 39 | +## Security / limits |
| 40 | +- [ ] No security or limits impact |
| 41 | +- [ ] Auth / permissions considered |
| 42 | +- [x] Data exposure, filtering, or token/size limits considered |
| 43 | + - `first: 25` caps the per-issue field array at the same limit the dotcom monolith enforces (`ORGANIZATION_ISSUE_FIELDS_LIMIT`). No new auth surface — the values are scoped to the same `repo` permission the existing query already requires. |
| 44 | + |
| 45 | +## Tool renaming |
| 46 | +- [ ] I am renaming tools as part of this PR (e.g. a part of a consolidation effort) |
| 47 | + - [ ] I have added the new tool aliases in `deprecated_tool_aliases.go` |
| 48 | +- [x] I am not renaming tools as part of this PR |
| 49 | + |
| 50 | +## Lint & tests |
| 51 | +- [x] Linted locally with `./script/lint` |
| 52 | +- [x] Tested locally with `./script/test` |
| 53 | + |
| 54 | +## Docs |
| 55 | +- [x] Not needed |
| 56 | + - Schema is auto-generated from tool definitions; no README changes required for an additive response field. |
| 57 | +- [ ] Updated (README / docs / examples) |
0 commit comments