From a9d02ea4adc2555376ef1e3e4d8fcd4aeba3f028 Mon Sep 17 00:00:00 2001 From: Patrick Marsceill Date: Wed, 21 Jan 2026 15:05:50 -0500 Subject: [PATCH] fix(cli): use project node ID for GitHub status updates The gh project item-edit command requires the GraphQL node ID (e.g., PVT_kwHOAA2t284BNI4p) not the project number. This was causing status updates to fail with "Could not resolve to a node" errors after task creation succeeded. Co-Authored-By: Claude Opus 4.5 --- internal/cli/task_sync.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/cli/task_sync.go b/internal/cli/task_sync.go index e616e43..68338d2 100644 --- a/internal/cli/task_sync.go +++ b/internal/cli/task_sync.go @@ -14,6 +14,7 @@ import ( // GitHub Project data structures for JSON parsing type ghProject struct { + ID string `json:"id"` Number int `json:"number"` Title string `json:"title"` } @@ -200,7 +201,7 @@ func runTaskSyncGHProject(cmd *cobra.Command, args []string) error { fmt.Printf(" Created task: %s\n", task.TaskId) // Update item status on GitHub - if err := updateItemStatus(project.Number, item.ID, statusField.ID, targetOptionID); err != nil { + if err := updateItemStatus(project.ID, item.ID, statusField.ID, targetOptionID); err != nil { fmt.Printf(" Warning: failed to update GitHub status: %v\n", err) } else { fmt.Printf(" Moved to %q on GitHub\n", syncTargetColumn) @@ -307,10 +308,10 @@ func buildTaskDescription(item ghItem) string { return sb.String() } -func updateItemStatus(projectNumber int, itemID, fieldID, optionID string) error { +func updateItemStatus(projectID, itemID, fieldID, optionID string) error { args := []string{ "project", "item-edit", - "--project-id", fmt.Sprintf("%d", projectNumber), + "--project-id", projectID, "--id", itemID, "--field-id", fieldID, "--single-select-option-id", optionID,