-
Couldn't load subscription status.
- Fork 2.9k
projects: add item field support #1282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for custom field selection in GitHub Projects V2 items, addressing issue #44. Users can now specify which field IDs to include when listing or retrieving project items, with only the title field returned by default if no fields are specified.
Key Changes:
- Added optional
fieldsparameter tolist_project_itemsandget_project_itemtools for selecting specific custom fields - Introduced
ManageProjectItemsPromptto guide users through project workflows including field discovery and updates - Refactored type system to distinguish between field definitions (
projectV2Field) and field values on items (projectV2ItemFieldValue)
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/github/tools.go | Registered the new ManageProjectItemsPrompt with the projects toolset |
| pkg/github/projects_test.go | Added test coverage for field parameter validation in list and get operations |
| pkg/github/projects.go | Implemented field selection logic, refactored options types, and added the ManageProjectItemsPrompt |
| pkg/github/minimal_types.go | Updated MinimalProjectItem to use projectV2ItemFieldValue type for fields |
| pkg/github/toolsnaps/list_project_items.snap | Updated schema snapshot to include fields parameter |
| pkg/github/toolsnaps/get_project_item.snap | Updated schema snapshot to include fields parameter |
| README.md | Documented the new fields parameter for both tools |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Towards: #44
This PR adds an optional
fieldsparameter tolist_project_itemsandget_project_itemtools, allowing users to specify which custom field IDs to include in responses. Previously, only the title field was returned by default.The implementation includes a new
ManageProjectItemsPromptthat provides step-by-step guidance for working with GitHub Projects, including discovering projects, viewing available fields, querying items with specific field values, and updating field values on project items.The type system is updated to distinguish between
projectV2Field(field definitions) andprojectV2FieldValues(field values on items), ensuring proper serialization of field data. Comprehensive test coverage validates field selection functionality across both organization and user-owned projects.