Support singular Project Issue Field updates - #2941
Conversation
Resolve and validate shared field updates and item references before executing ordered, chunked GraphQL writes with explicit ambiguous outcomes. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7ae767ff-c1d0-46a9-b126-2e91403993a0
Add the public projects_write contract, routing, handler coverage, and generated documentation for shared field updates across batches of up to 50 items. Co-authored-by: Lizeth Vera <47796851+veralizeth@users.noreply.github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7ae767ff-c1d0-46a9-b126-2e91403993a0
Use a neutral code for non-structured lookup failures while preserving structured resolution details. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7ae767ff-c1d0-46a9-b126-2e91403993a0
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7ae767ff-c1d0-46a9-b126-2e91403993a0 Copilot-Session: 5709a470-df75-43ec-9a9c-98868e6065d2
Support name-based attached Issue Field updates for singular Project items while preserving existing read and standard field behavior. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4c94f3ce-c04a-482f-830b-ab85abc3f6e4
Bypass Issue Field metadata resolution for standard field data types and recognize exact missing fragment-type schema errors. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4c94f3ce-c04a-482f-830b-ab85abc3f6e4
577a645 to
cfa16b2
Compare
| } | ||
| } `graphql:"setIssueFieldValue(input: $input)"` | ||
| }{}, | ||
| setIssueFieldValueMutation{}, |
There was a problem hiding this comment.
Only id/url are used. SetIssueFieldValues returns MinimalResponse{ID, URL}, so the extra IssueFieldValues selections were dead weight. Replacing it with a simpler type.
| // are gated behind the update_issue_suggestions GraphQL feature flag. | ||
| ctxWithFeatures := ghcontext.WithGraphQLFeatures(ctx, "update_issue_suggestions") | ||
| if err := gqlClient.Mutate(ctxWithFeatures, &mutation, mutationInput, nil); err != nil { | ||
| response, err := SetIssueFieldValues(ctxWithFeatures, gqlClient, mutationInput) |
There was a problem hiding this comment.
SetIssueFieldValues is exported so projects, calls it directly. Also the mutation call is extracted into SetIssueFieldValues so both set_issue_fields (issues) and update_project_item (projects) can use it, with the flagged ctx.
There was a problem hiding this comment.
Pull request overview
Adds singular attached Issue Field updates to update_project_item while preserving standard Project field behavior.
Changes:
- Resolves and updates attached text, number, date, and single-select fields by name.
- Reuses a minimal, conflict-free Issue Field mutation response.
- Adds regression and validation coverage for reads, writes, metadata, and unsupported items.
Show a summary per file
| File | Description |
|---|---|
pkg/github/projects.go |
Dispatches attached Issue Field updates and validates values/items. |
pkg/github/projects_test.go |
Tests reads, dispatch, conversions, and item validation. |
pkg/github/projects_resolver.go |
Resolves attached Issue Field metadata and options. |
pkg/github/projects_resolver_test.go |
Tests metadata resolution, fallback, and existing behavior. |
pkg/github/issues_granular.go |
Extracts the shared minimal mutation helper. |
pkg/github/granular_tools_test.go |
Verifies the simplified mutation selection and existing tool behavior. |
Review details
- Files reviewed: 6/6 changed files
- Comments generated: 0
- Review effort level: Medium
| // The setIssueFieldValue mutation is gated behind the update_issue_suggestions | ||
| // GraphQL feature flag, matching the set_issue_fields tool. | ||
| ctxWithFeatures := ghcontext.WithGraphQLFeatures(ctx, "update_issue_suggestions") | ||
| response, mutationErr := SetIssueFieldValues(ctxWithFeatures, gqlClient, SetIssueFieldValueInput{ |
There was a problem hiding this comment.
I just ran into this PR, and I thought that could be useful to mention the issue update method which also handles issue field values. From what I gather from the current PR, going for granular solution makes more sense. In case you need to make multiple issue updates (to the issue - project item), you could also batch the updates in one request.
Summary
Adds focused attached Issue Field support to singular
update_project_itemname-form writes. This PR is stacked on #2903.Why
Completes the singular Issue Field update path while preserving existing Project field behavior.
Addresses github/planning-tracking#3523
What changed
field_namesreads surface attached Issue Field values without changing read queries.update_project_itemby field name.MCP impact
Prompts tested (tool changes only)
Security / limits
Tool renaming
deprecated_tool_aliases.goLint & tests
./script/lint./script/testDocs