Add custom field filtering to list_issues#2480
Draft
kelsey-myers wants to merge 3 commits into
Draft
Conversation
Adds Issues 2.0 custom field values to each issue returned by the
list_issues GraphQL query, exposed on MinimalIssue as field_values:
[{field, value}]. Filtering by field is a separate concern (needs the
GraphQL IssueFilters input updated upstream) and is not included here.
shurcooL/graphql's response decoder walks every inline fragment of a
union regardless of __typename, so IssueFieldNumberValue.value is
aliased to valueNumber to avoid a Float-vs-String type clash when the
runtime variant is, e.g., a SingleSelectValue.
Author
|
Sample Input: Sample Output: |
leuasseurfarrelds247-arch
approved these changes
May 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extend
list_issuesso callers can filter issues by custom field values (single-select, text, number, date) alongside the existing label, state, andsincefilters.Why
The
IssueFilters.issueFieldValuesargument is available in the GraphQL schema (gated by theissue_fieldsfeature flag) and the existinglist_issuestool returns field values on each issue, but there was no way to filter by them. Without this, agents have to fetch all issues and filter client-side which doesn't scale and is wasteful.Stacked on top of #2466 — will retarget once that merges. Until then this PR shows both sets of commits.
What changed
field_filtersarray parameter tolist_issues. Each entry takes afield_nameplus exactly one ofsingle_select_value,text_value,number_value, ordate_value.ListIssuesQuery*variants via a newissueFieldValuesGraphQL variable. The variable is always sent (empty slice when no filters are supplied), the resolver treats an empty list as a no-op.parseFieldFiltershelper that validates exactly one typed value per filter and propagates type errors uniformly.GraphQL-Features: issue_fieldson outgoing requests via the existingGraphQLFeaturesTransportso the gated input type resolves while the flag is still rolling out. Safe to keep after rollout (no-op).number_value: 0(must be treated as set), and a regression guard that theGraphQL-Featuresheader is sent.MCP impact
list_issuesgains an optionalfield_filtersparameter. Default behaviour (nofield_filters) is unchanged.Prompts tested (tool changes only)
sincepath (regression)github/issuesSecurity / limits
No new auth surface. Uses the same scopes as
list_issuestoday. TheGraphQL-Featuresheader opts into a schema-level feature flag and does not bypass any authorization.Tool renaming
Lint & tests
./script/lint./script/testDocs
script/generate-docsregeneratedREADME.mdand thelist_issuestoolsnap.