-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Add tools to add, update and delete project items #1152
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
c3cd512
Add add_project_item tool
JoannaaKL aa4065b
Add tools to update and delete project items
JoannaaKL 7463e5f
Update pkg/github/projects.go
JoannaaKL f4bbd39
Update pkg/github/projects.go
JoannaaKL 3223581
Add tests
JoannaaKL 58ec448
Lint the code
JoannaaKL f456667
Fix req params
JoannaaKL File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"annotations": { | ||
"title": "Add project item", | ||
"readOnlyHint": false | ||
}, | ||
"description": "Add a specific Project item for a user or org", | ||
"inputSchema": { | ||
"properties": { | ||
"item_id": { | ||
"description": "The numeric ID of the issue or pull request to add to the project.", | ||
"type": "number" | ||
}, | ||
"item_type": { | ||
"description": "The item's type, either issue or pull_request.", | ||
"enum": [ | ||
"issue", | ||
"pull_request" | ||
], | ||
"type": "string" | ||
}, | ||
"owner": { | ||
"description": "If owner_type == user it is the handle for the GitHub user account. If owner_type == org it is the name of the organization. The name is not case sensitive.", | ||
"type": "string" | ||
}, | ||
"owner_type": { | ||
"description": "Owner type", | ||
"enum": [ | ||
"user", | ||
"org" | ||
], | ||
"type": "string" | ||
}, | ||
"project_number": { | ||
"description": "The project's number.", | ||
"type": "number" | ||
} | ||
}, | ||
"required": [ | ||
"owner_type", | ||
"owner", | ||
"project_number", | ||
"item_type", | ||
"item_id" | ||
], | ||
"type": "object" | ||
}, | ||
"name": "add_project_item" | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"annotations": { | ||
"title": "Delete project item", | ||
"readOnlyHint": false | ||
}, | ||
"description": "Delete a specific Project item for a user or org", | ||
"inputSchema": { | ||
"properties": { | ||
"item_id": { | ||
"description": "The internal project item ID to delete from the project (not the issue or pull request ID).", | ||
"type": "number" | ||
}, | ||
"owner": { | ||
"description": "If owner_type == user it is the handle for the GitHub user account. If owner_type == org it is the name of the organization. The name is not case sensitive.", | ||
"type": "string" | ||
}, | ||
"owner_type": { | ||
"description": "Owner type", | ||
"enum": [ | ||
"user", | ||
"org" | ||
], | ||
"type": "string" | ||
}, | ||
"project_number": { | ||
"description": "The project's number.", | ||
"type": "number" | ||
} | ||
}, | ||
"required": [ | ||
"owner_type", | ||
"owner", | ||
"project_number", | ||
"item_id" | ||
], | ||
"type": "object" | ||
}, | ||
"name": "delete_project_item" | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"annotations": { | ||
"title": "Update project item", | ||
"readOnlyHint": false | ||
}, | ||
"description": "Update a specific Project item for a user or org", | ||
"inputSchema": { | ||
"properties": { | ||
"fields": { | ||
"description": "A list of field updates to apply.", | ||
"type": "array" | ||
}, | ||
"item_id": { | ||
"description": "The numeric ID of the project item to update (not the issue or pull request ID).", | ||
"type": "number" | ||
}, | ||
"owner": { | ||
"description": "If owner_type == user it is the handle for the GitHub user account. If owner_type == org it is the name of the organization. The name is not case sensitive.", | ||
"type": "string" | ||
}, | ||
"owner_type": { | ||
"description": "Owner type", | ||
"enum": [ | ||
"user", | ||
"org" | ||
], | ||
"type": "string" | ||
}, | ||
"project_number": { | ||
"description": "The project's number.", | ||
"type": "number" | ||
} | ||
}, | ||
"required": [ | ||
"owner_type", | ||
"owner", | ||
"project_number", | ||
"item_id", | ||
"fields" | ||
], | ||
"type": "object" | ||
}, | ||
"name": "update_project_item" | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -163,4 +163,4 @@ func TestGetToolsetInstructions(t *testing.T) { | |
} | ||
}) | ||
} | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
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.
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can mean either an issue id or a pr id, depending on the item type