Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 9 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -822,20 +822,6 @@ The following sets of tools are available (all are on by default):
- `startSide`: For multi-line comments, the starting side of the diff that the comment applies to. LEFT indicates the previous state, RIGHT indicates the new state (string, optional)
- `subjectType`: The level at which the comment is targeted (string, required)

- **create_and_submit_pull_request_review** - Create and submit a pull request review without comments
- `body`: Review comment text (string, required)
- `commitID`: SHA of commit to review (string, optional)
- `event`: Review action to perform (string, required)
- `owner`: Repository owner (string, required)
- `pullNumber`: Pull request number (number, required)
- `repo`: Repository name (string, required)

- **create_pending_pull_request_review** - Create pending pull request review
- `commitID`: SHA of commit to review (string, optional)
- `owner`: Repository owner (string, required)
- `pullNumber`: Pull request number (number, required)
- `repo`: Repository name (string, required)

- **create_pull_request** - Open new pull request
- `base`: Branch to merge into (string, required)
- `body`: PR description (string, optional)
Expand All @@ -846,11 +832,6 @@ The following sets of tools are available (all are on by default):
- `repo`: Repository name (string, required)
- `title`: PR title (string, required)

- **delete_pending_pull_request_review** - Delete the requester's latest pending pull request review
- `owner`: Repository owner (string, required)
- `pullNumber`: Pull request number (number, required)
- `repo`: Repository name (string, required)

- **list_pull_requests** - List pull requests
- `base`: Filter by base branch (string, optional)
- `direction`: Sort direction (string, optional)
Expand Down Expand Up @@ -886,6 +867,15 @@ Possible options:
- `pullNumber`: Pull request number (number, required)
- `repo`: Repository name (string, required)

- **pull_request_review_write** - Write operations (create, submit, delete) on pull request reviews.
- `body`: Review comment text (string, optional)
- `commitID`: SHA of commit to review (string, optional)
- `event`: Review action to perform. (string, optional)
- `method`: The write operation to perform on pull request review. (string, required)
- `owner`: Repository owner (string, required)
- `pullNumber`: Pull request number (number, required)
- `repo`: Repository name (string, required)

- **request_copilot_review** - Request Copilot review
- `owner`: Repository owner (string, required)
- `pullNumber`: Pull request number (number, required)
Expand All @@ -900,13 +890,6 @@ Possible options:
- `repo`: Optional repository name. If provided with owner, only pull requests for this repository are listed. (string, optional)
- `sort`: Sort field by number of matches of categories, defaults to best match (string, optional)

- **submit_pending_pull_request_review** - Submit the requester's latest pending pull request review
- `body`: The text of the review comment (string, optional)
- `event`: The event to perform (string, required)
- `owner`: Repository owner (string, required)
- `pullNumber`: Pull request number (number, required)
- `repo`: Repository name (string, required)

- **update_pull_request** - Edit pull request
- `base`: New base branch name (string, optional)
- `body`: New description (string, optional)
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

8 changes: 8 additions & 0 deletions pkg/github/__toolsnaps__/pull_request_read.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@
"properties": {
"method": {
"description": "Action to specify what pull request data needs to be retrieved from GitHub. \nPossible options: \n 1. get - Get details of a specific pull request.\n 2. get_diff - Get the diff of a pull request.\n 3. get_status - Get status of a head commit in a pull request. This reflects status of builds and checks.\n 4. get_files - Get the list of files changed in a pull request. Use with pagination parameters to control the number of results returned.\n 5. get_review_comments - Get the review comments on a pull request. Use with pagination parameters to control the number of results returned.\n 6. get_reviews - Get the reviews on a pull request. When asked for review comments, use get_review_comments method.\n",
"enum": [
"get",
"get_diff",
"get_status",
"get_files",
"get_review_comments",
"get_reviews"
],
"type": "string"
},
"owner": {
Expand Down
57 changes: 57 additions & 0 deletions pkg/github/__toolsnaps__/pull_request_review_write.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"annotations": {
"title": "Write operations (create, submit, delete) on pull request reviews.",
"readOnlyHint": false
},
"description": "Create and/or submit, delete review of a pull request.\n\nAvailable methods:\n- create: Create a new review of a pull request. If \"event\" parameter is provided, the review is submitted. If \"event\" is omitted, a pending review is created.\n- submit_pending: Submit an existing pending review of a pull request. This requires that a pending review exists for the current user on the specified pull request. The \"body\" and \"event\" parameters are used when submitting the review.\n- delete_pending: Delete an existing pending review of a pull request. This requires that a pending review exists for the current user on the specified pull request.\n",
"inputSchema": {
"properties": {
"body": {
"description": "Review comment text",
"type": "string"
},
"commitID": {
"description": "SHA of commit to review",
"type": "string"
},
"event": {
"description": "Review action to perform.",
"enum": [
"APPROVE",
"REQUEST_CHANGES",
"COMMENT"
],
"type": "string"
},
"method": {
"description": "The write operation to perform on pull request review.",
"enum": [
"create",
"submit_pending",
"delete_pending"
],
"type": "string"
},
"owner": {
"description": "Repository owner",
"type": "string"
},
"pullNumber": {
"description": "Pull request number",
"type": "number"
},
"repo": {
"description": "Repository name",
"type": "string"
}
},
"required": [
"method",
"owner",
"repo",
"pullNumber"
],
"type": "object"
},
"name": "pull_request_review_write"
}

This file was deleted.

12 changes: 9 additions & 3 deletions pkg/github/instructions.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,17 @@ Tool usage guidance:
func getToolsetInstructions(toolset string) string {
switch toolset {
case "pull_requests":
return "## Pull Requests\n\nPR review workflow: Always use 'create_pending_pull_request_review' → 'add_comment_to_pending_review' → 'submit_pending_pull_request_review' for complex reviews with line-specific comments."
return `## Pull Requests

PR review workflow: Always use 'pull_request_review_write' with method 'create' to create a pending review, then 'add_comment_to_pending_review' to add comments, and finally 'pull_request_review_write' with method 'submit_pending' to submit the review for complex reviews with line-specific comments.`
case "issues":
return "## Issues\n\nCheck 'list_issue_types' first for organizations to use proper issue types. Use 'search_issues' before creating new issues to avoid duplicates. Always set 'state_reason' when closing issues."
return `## Issues

Check 'list_issue_types' first for organizations to use proper issue types. Use 'search_issues' before creating new issues to avoid duplicates. Always set 'state_reason' when closing issues.`
case "discussions":
return "## Discussions\n\nUse 'list_discussion_categories' to understand available categories before creating discussions. Filter by category for better organization."
return `## Discussions

Use 'list_discussion_categories' to understand available categories before creating discussions. Filter by category for better organization.`
default:
return ""
}
Expand Down
Loading
Loading