Make owner_type optional and fix add_project_item in consolidated Projects V2 tools #1799
+404
−115
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
Makes
owner_typeoptional in consolidated Projects V2 tools and fixesadd_project_itemto use explicit repository context instead of opaque IDs.Why
Addresses two related issues:
add_project_itemaccepted raw issue numbers without repository context, causing random external issues to be added to projectsRelated: #1773, #1745
What changed
owner_typeoptional inprojects_list,projects_get, andprojects_writeconsolidated toolsdetectOwnerTypehelper)projects_listto fetch from both user and org whenowner_typenot specified:owner_typefield on each projectadd_project_iteminprojects_write:item_owner,item_repo,issue_number/pull_request_numberitem_idparameteraddProjectV2ItemByIdmutation for accurate additionsOwnerTypefield toMinimalProjecttyperesolveIssueNodeID,resolvePullRequestNodeIDIndividual tools unchanged (only consolidated tools modified per
FeatureFlagConsolidatedProjects)MCP impact
projects_list,projects_get,projects_writeschemas updatedowner_typenow optional (was required)add_project_itemparameters changed fromitem_idtoitem_owner/item_repo/issue_number/pull_request_numberPrompts tested (tool changes only)
Security / limits
Tool renaming
Lint & tests
./script/lint./script/testadd_project_itemtests with TODO (require GraphQL mocking)Docs
script/generate-docsOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.