Skip to content

Commit d220a4e

Browse files
committed
re-add pull_requests toolset, fix whitespace
1 parent 12fbebc commit d220a4e

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

pkg/github/__toolsnaps__/pull_request_read.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"properties": {
1616
"method": {
1717
"type": "string",
18-
"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. They are comments made on a portion of the unified diff during a pull request review. 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 7. get_comments - Get comments on a pull request. Use this if user doesn't specifically want review comments. Use with pagination parameters to control the number of results returned.\n",
18+
"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. They are comments made on a portion of the unified diff during a pull request review. 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 7. get_comments - Get comments on a pull request. Use this if user doesn't specifically want review comments. Use with pagination parameters to control the number of results returned.\n",
1919
"enum": [
2020
"get",
2121
"get_diff",

pkg/github/pullrequests.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ func PullRequestRead(getClient GetClientFn, t translations.TranslationHelperFunc
2626
Properties: map[string]*jsonschema.Schema{
2727
"method": {
2828
Type: "string",
29-
Description: `Action to specify what pull request data needs to be retrieved from GitHub.
30-
Possible options:
29+
Description: `Action to specify what pull request data needs to be retrieved from GitHub.
30+
Possible options:
3131
1. get - Get details of a specific pull request.
3232
2. get_diff - Get the diff of a pull request.
3333
3. get_status - Get status of a head commit in a pull request. This reflects status of builds and checks.

pkg/github/tools.go

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -223,23 +223,23 @@ func DefaultToolsetGroup(readOnly bool, getClient GetClientFn, getGQLClient GetG
223223
// AddReadTools(
224224
// toolsets.NewServerTool(SearchOrgs(getClient, t)),
225225
// )
226-
// pullRequests := toolsets.NewToolset(ToolsetMetadataPullRequests.ID, ToolsetMetadataPullRequests.Description).
227-
// AddReadTools(
228-
// toolsets.NewServerTool(PullRequestRead(getClient, t, flags)),
229-
// toolsets.NewServerTool(ListPullRequests(getClient, t)),
230-
// toolsets.NewServerTool(SearchPullRequests(getClient, t)),
231-
// ).
232-
// AddWriteTools(
233-
// toolsets.NewServerTool(MergePullRequest(getClient, t)),
234-
// toolsets.NewServerTool(UpdatePullRequestBranch(getClient, t)),
235-
// toolsets.NewServerTool(CreatePullRequest(getClient, t)),
236-
// toolsets.NewServerTool(UpdatePullRequest(getClient, getGQLClient, t)),
237-
// toolsets.NewServerTool(RequestCopilotReview(getClient, t)),
238-
239-
// // Reviews
240-
// toolsets.NewServerTool(PullRequestReviewWrite(getGQLClient, t)),
241-
// toolsets.NewServerTool(AddCommentToPendingReview(getGQLClient, t)),
242-
// )
226+
pullRequests := toolsets.NewToolset(ToolsetMetadataPullRequests.ID, ToolsetMetadataPullRequests.Description).
227+
AddReadTools(
228+
toolsets.NewServerTool(PullRequestRead(getClient, t, flags)),
229+
toolsets.NewServerTool(ListPullRequests(getClient, t)),
230+
toolsets.NewServerTool(SearchPullRequests(getClient, t)),
231+
).
232+
AddWriteTools(
233+
toolsets.NewServerTool(MergePullRequest(getClient, t)),
234+
toolsets.NewServerTool(UpdatePullRequestBranch(getClient, t)),
235+
toolsets.NewServerTool(CreatePullRequest(getClient, t)),
236+
toolsets.NewServerTool(UpdatePullRequest(getClient, getGQLClient, t)),
237+
toolsets.NewServerTool(RequestCopilotReview(getClient, t)),
238+
239+
// Reviews
240+
toolsets.NewServerTool(PullRequestReviewWrite(getGQLClient, t)),
241+
toolsets.NewServerTool(AddCommentToPendingReview(getGQLClient, t)),
242+
)
243243
codeSecurity := toolsets.NewToolset(ToolsetMetadataCodeSecurity.ID, ToolsetMetadataCodeSecurity.Description).
244244
AddReadTools(
245245
toolsets.NewServerTool(GetCodeScanningAlert(getClient, t)),
@@ -365,7 +365,7 @@ func DefaultToolsetGroup(readOnly bool, getClient GetClientFn, getGQLClient GetG
365365
tsg.AddToolset(issues)
366366
// tsg.AddToolset(orgs)
367367
// tsg.AddToolset(users)
368-
// tsg.AddToolset(pullRequests)
368+
tsg.AddToolset(pullRequests)
369369
// tsg.AddToolset(actions)
370370
tsg.AddToolset(codeSecurity)
371371
tsg.AddToolset(dependabot)

0 commit comments

Comments
 (0)