Add tools to add, update and delete project items#1152
Add tools to add, update and delete project items#1152JoannaaKL merged 7 commits intogithub:mainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds write operations for GitHub project items, enabling users to create, update, and delete project items programmatically. The implementation follows the existing pattern for read-only operations and includes comprehensive test coverage.
- Add three new write tools: AddProjectItem, DeleteProjectItem, and UpdateProjectItem
- Each tool supports both user and organization project contexts with proper parameter validation
- Comprehensive test coverage with various success and error scenarios
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/github/tools.go | Registers the new write tools in the toolset group |
| pkg/github/projects.go | Implements the three new project item manipulation functions with proper error handling |
| pkg/github/projects_test.go | Adds comprehensive test coverage for AddProjectItem including edge cases |
| pkg/github/toolsnaps/add_project_item.snap | Generated snapshot for tool schema validation |
| README.md | Updates documentation with the new tool descriptions and parameters |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
b52fc1d to
f4bbd39
Compare
| <summary>Projects</summary> | ||
|
|
||
| - **add_project_item** - Add project item | ||
| - `item_id`: The numeric ID of the issue or pull request to add to the project. (number, required) |
There was a problem hiding this comment.
item_id here means pr id below specifically something else, would this benefit from a new distinct name, or below (not the issue or pull request ID).
There was a problem hiding this comment.
It can mean either an issue id or a pr id, depending on the item type
* Add add_project_item tool * Add tools to update and delete project items * Update pkg/github/projects.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update pkg/github/projects.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Add tests * Lint the code * Fix req params --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This PR adds:
Last chunk of work to add tools wrapping Projects V2 https://docs.github.com/en/rest/projects/items?apiVersion=2022-11-28
Implements #44