Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged

Conversation

JoannaaKL
Copy link
Contributor

@JoannaaKLJoannaaKL commentedOct 8, 2025
edited
Loading

This pr:

@JoannaaKLJoannaaKL marked this pull request as ready for reviewOctober 9, 2025 08:00
@JoannaaKLJoannaaKL requested a review froma team as acode ownerOctober 9, 2025 08:00
@CopilotCopilotAI review requested due to automatic review settingsOctober 9, 2025 08:00
Copy link
Contributor

@CopilotCopilotAI left a 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.

  • AddUpdateProjectItem 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
FileDescription
pkg/github/tools.goRegisters the new UpdateProjectItem tool in the write toolset
pkg/github/projects.goImplements UpdateProjectItem function with validation and API call logic
pkg/github/projects_test.goAdds comprehensive test suite covering success and error scenarios
pkg/github/minimal_types.goExtends MinimalProjectItem struct with Title and Description fields
pkg/github/toolsnaps/update_project_item.snapTool schema snapshot for testing validation
README.mdDocuments the new update_project_item tool parameters

Tip: Customize your code reviews with copilot-instructions.md.Create the file orlearn how to get started.

@JoannaaKLJoannaaKLforce-pushed theadd-update_project_item-tool branch fromc6415d1 tod835623CompareOctober 9, 2025 09:09
@tonytrg
Copy link
Contributor

tonytrg commentedOct 9, 2025
edited
Loading

I am having a hard time understandingnew_field, not too familiar with the api of projects but it seems hard to understand to me only from the mcps side of description.

https://docs.github.com/en/rest/projects/items?apiVersion=2022-11-28#update-project-item-for-organization--parameters

fields array of objects Required
A list of field updates to apply.

id integer Required
The ID of the project field to update.

value null or string or number Required
The new value for the field:

For text, number, and date fields, provide the new value directly.
For single select and iteration fields, provide the ID of the option or iteration.
To clear the field, set this to null.

),
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\"}"),
Copy link
Contributor

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",},),

Copy link
Contributor

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

almaleksia reacted with thumbs up emoji
Copy link
Contributor

@tonytrgtonytrgOct 9, 2025
edited
Loading

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?

Copy link
Contributor

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

Copy link
ContributorAuthor

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

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

We can do it 👍

Copy link
Contributor

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

@tonytrg
Copy link
Contributor

tonytrg commentedOct 9, 2025
edited
Loading

💯 thanks for making this complicated one work

note for future as i dont want to block this merge:

  • correct parsing of the iteration ids is missing right now, but as that actually should be part of the sdk we can fix that later on
JoannaaKL reacted with heart emoji

@JoannaaKLJoannaaKL merged commit5c61abe intogithub:mainOct 9, 2025
10 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@almaleksiaalmaleksiaalmaleksia left review comments

Copilot code reviewCopilotCopilot left review comments

@tonytrgtonytrgtonytrg approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Add support for Projects
3 participants
@JoannaaKL@tonytrg@almaleksia

[8]ページ先頭

©2009-2025 Movatter.jp