{"record":{"id":"4f1f7a4b80796358","repo":"github/github-mcp-server","slug":"item-owner-item-repo-and-issue-number-must-all-b","errorCode":null,"errorMessage":"item_owner, item_repo, and issue_number must all be provided together: %w","messagePattern":"item_owner, item_repo, and issue_number must all be provided together: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/github/projects_batch.go","lineNumber":433,"sourceCode":"\t\tif !ok || s == \"\" {\n\t\t\treturn fmt.Errorf(\"node_id must be a non-empty string\")\n\t\t}\n\t\tp.refKind = batchRefNodeID\n\t\tp.nodeID = s\n\tcase hasItemID:\n\t\tid, err := validatePositiveInt64(entry[\"item_id\"])\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"item_id: %w\", err)\n\t\t}\n\t\tp.refKind = batchRefItemID\n\t\tp.itemID = id\n\tdefault:\n\t\tissueOwner, ownerErr := stringFromEntry(entry, \"item_owner\")\n\t\tissueRepo, repoErr := stringFromEntry(entry, \"item_repo\")\n\t\tissueNumber, numErr := intFromEntry(entry, \"issue_number\")\n\t\tfor _, err := range []error{ownerErr, repoErr, numErr} {\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"item_owner, item_repo, and issue_number must all be provided together: %w\", err)\n\t\t\t}\n\t\t}\n\t\tp.refKind = batchRefIssue\n\t\tp.issueOwner = issueOwner\n\t\tp.issueRepo = issueRepo\n\t\tp.issueNumber = issueNumber\n\t}\n\treturn nil\n}\n\nfunc itemRefEcho(entry map[string]any) map[string]any {\n\tref := map[string]any{}\n\tfor _, key := range []string{\"node_id\", \"item_id\", \"item_owner\", \"item_repo\", \"issue_number\"} {\n\t\tif v, ok := entry[key]; ok {\n\t\t\tref[key] = v\n\t\t}\n\t}\n\tif len(ref) == 0 {","sourceCodeStart":415,"sourceCodeEnd":451,"githubUrl":"https://github.com/github/github-mcp-server/blob/0ea1f775a7c73eff1bd2e25904d01136756bbfe2/pkg/github/projects_batch.go#L415-L451","documentation":"Raised by parseItemRef (pkg/github/projects_batch.go:433) when an item uses the issue-reference form but one of item_owner, item_repo, or issue_number is missing or invalid. The three fields are evaluated together and the first failing one is wrapped into this message. The item is marked 'invalid_item_ref'.","triggerScenarios":"Any item where at least one of item_owner/item_repo/issue_number is present (making hasIssueRef true) but not all three are valid — e.g. missing issue_number, item_owner present but item_repo absent, or issue_number as a string. Also triggers when the item has no node_id/item_id so the default branch handles it.","commonSituations":"Building refs from a bug-tracker export where the repo or number column is sometimes blank; using a bare \"number\" key instead of \"issue_number\"; owner/repo populated by default config with the number supplied per-item and sometimes omitted.","solutions":["Supply all three keys on every issue-ref item: item_owner, item_repo, issue_number","Verify the exact key names (issue_number, not number/issue/num)","Check each value's type: owner/repo are non-empty strings, issue_number is a positive integer within int32 range","Validate the triple together before appending the item to the batch"],"exampleFix":"// before\n{\"items\": [{\"item_owner\": \"octo\", \"item_repo\": \"repo\"}]}\n// after\n{\"items\": [{\"item_owner\": \"octo\", \"item_repo\": \"repo\", \"issue_number\": 42}]}","handlingStrategy":"validation","validationCode":"func validIssueRef(entry map[string]any) bool {\n\t_, o := entry[\"item_owner\"]\n\t_, r := entry[\"item_repo\"]\n\t_, n := entry[\"issue_number\"]\n\tif !o && !r && !n { return true } // not the issue form at all\n\towner, o1 := entry[\"item_owner\"].(string)\n\trepo, r1 := entry[\"item_repo\"].(string)\n\tnum, n1 := entry[\"issue_number\"].(float64)\n\treturn o1 && r1 && n1 && owner != \"\" && repo != \"\" && num == float64(int64(num)) && int64(num) > 0 && int64(num) <= 2147483647\n}","typeGuard":"func isCompleteIssueRef(entry map[string]any) bool { return validIssueRef(entry) }","tryCatchPattern":null,"preventionTips":["Treat owner/repo/number as one atomic triple in your data model","Do not partially populate the triple from different sources without a merge step","Reject rows missing any of the three before building the batch"],"tags":["github-projects","batch","input-validation","issue-ref"],"backgroundTag":null,"analyzedSha":"0ea1f775a7c73eff1bd2e25904d01136756bbfe2","analyzedAt":"2026-08-15T18:10:19.804Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}