Commit 047505f
Replace update_project_items REST loop with chunked aliased mutations
Rewire update_project_items to resolve the project, every distinct
field, and every item once up front, then write via the
projects_batch_mutation.go aliased-mutation builder, chunked into
sequential requests of 20, instead of one REST PATCH per item.
- projects_batch_resolve.go: field/item resolution. Adds node_id as a
third item-reference form (alongside item_id and
item_owner+item_repo+issue_number, exactly one required per item),
bypassing REST lookup entirely. Numeric item_id values are
deduplicated and resolved to node IDs via bounded-concurrency REST
GETs; issue refs are deduplicated and resolved via the paginated
resolver from the previous commit. updated_field.value is converted
to the matching ProjectV2FieldValue member for TEXT, NUMBER, DATE,
SINGLE_SELECT, and ITERATION; null routes to the clear mutation.
- projects_batch.go: orchestration. Rejects duplicate item+field
targets before any writes, partitions into update/clear chunks, and
tracks tri-state per-item results (succeeded/failed/unknown). After
an ambiguous transport-level failure or context cancellation, no
further chunks are sent.
- projects.go: removed the old REST-loop implementation and its
helpers; added node_id to the update_project_items item schema.
- Removed the stale comment claiming the pinned client couldn't build
dynamic aliases.
- Updated/added tests accordingly, including toolsnap and README
regeneration for the schema change.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d7dc302d-e6f2-41e9-a2c8-ed598de470671 parent 4338107 commit 047505f
9 files changed
Lines changed: 1843 additions & 812 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1101 | 1101 | | |
1102 | 1102 | | |
1103 | 1103 | | |
1104 | | - | |
| 1104 | + | |
1105 | 1105 | | |
1106 | 1106 | | |
1107 | 1107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
64 | 68 | | |
65 | 69 | | |
66 | 70 | | |
| |||
0 commit comments