- Notifications
You must be signed in to change notification settings - Fork2.7k
Add update project item tool#1194
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 ourterms of service andprivacy 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 a new tool to update project items for users or organizations, addressing issue#44. The implementation follows the existing pattern of project item management tools by adding theUpdateProjectItem
function with comprehensive validation and testing.
- Add
UpdateProjectItem
tool function with field update capabilities - Implement comprehensive test coverage with error handling scenarios
- Update project item data structures to support additional fields
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
File | Description |
---|---|
pkg/github/tools.go | Registers the new UpdateProjectItem tool in the write toolset |
pkg/github/projects.go | Implements UpdateProjectItem function with validation and API call logic |
pkg/github/projects_test.go | Adds comprehensive test suite covering success and error scenarios |
pkg/github/minimal_types.go | Extends MinimalProjectItem struct with Title and Description fields |
pkg/github/toolsnaps/update_project_item.snap | Tool schema snapshot for testing validation |
README.md | Documents the new update_project_item tool parameters |
Tip: Customize your code reviews with copilot-instructions.md.Create the file orlearn how to get started.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
…item-tool' into add-update_project_item-tool
…item-tool' into add-update_project_item-tool
c6415d1
tod835623
Comparetonytrg commentedOct 9, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I am having a hard time understanding fields array of objects Required id integer Required value null or string or number Required For text, number, and date fields, provide the new value directly. |
), | ||
mcp.WithObject("new_field", | ||
mcp.Required(), | ||
mcp.Description("Object consisting of the ID of the project field to update and the new value for the field. To clear the field, set\"value\" to null. Example: {\"id\": 123456,\"value\":\"New Value\"}"), |
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.
seems like we are looking for a map struct.
Should it look something like this
mcp.Items(map[string]interface{}{"type": "string",},),
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.
I am not sure if we can rely on the llm to always understand and format a correct parseable struct
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.
ah ok i see it needs to be more flexible
mcp.WithObject("new_field",mcp.Required(),mcp.Description("Object consisting of the ID of the project field to update and the new value for the field. To clear the field, set \"value\" to null."),mcp.Properties(map[string]any{"id": map[string]any{"type": "number","description": "The ID of the project field to update (required)",},"value": map[string]any{"description": "The new value for the field. Can be a string for text fields, a number for number/single_select/iteration fields, or null to clear the field (required)",},}),
would something like that help?
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.
I'd propose we split it into 2 fields which is field_id and field_value
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.
How the types would look like then? We can useWithNumber
for the field_id but field value needs to stay an object
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.
We can do it 👍
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.
@almaleksia@JoannaaKL i updated the struct the one before was wrong
…item-tool' into add-update_project_item-tool
ab0ae59
tof48befc
CompareUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
tonytrg commentedOct 9, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
💯 thanks for making this complicated one work note for future as i dont want to block this merge:
|
5c61abe
intogithub:mainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
This pr:
Closes:Add support for Projects #44 (comment)