Skip to content

Commit 09c15a1

Browse files
fix(pull-requests): retain granular schema descriptions
Keep the original enum guidance in input descriptions while preserving actual JSON Schema enum constraints. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 6e5497f commit 09c15a1

6 files changed

Lines changed: 14 additions & 14 deletions

‎pkg/github/__toolsnaps__/add_pull_request_review_comment.snap‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"x-mcp-header": "repo"
5050
},
5151
"side": {
52-
"description": "The side of the diff to comment on (optional)",
52+
"description": "The side of the diff to comment on (LEFT or RIGHT, optional)",
5353
"enum": [
5454
"LEFT",
5555
"RIGHT"
@@ -61,15 +61,15 @@
6161
"type": "number"
6262
},
6363
"startSide": {
64-
"description": "The start side of a multi-line comment (optional)",
64+
"description": "The start side of a multi-line comment (LEFT or RIGHT, optional)",
6565
"enum": [
6666
"LEFT",
6767
"RIGHT"
6868
],
6969
"type": "string"
7070
},
7171
"subjectType": {
72-
"description": "The subject type of the comment",
72+
"description": "The subject type of the comment (FILE or LINE)",
7373
"enum": [
7474
"FILE",
7575
"LINE"

‎pkg/github/__toolsnaps__/add_pull_request_review_comment_reaction.snap‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"type": "number"
2828
},
2929
"content": {
30-
"description": "The emoji reaction type",
30+
"description": "The emoji reaction type (+1, -1, laugh, confused, heart, hooray, rocket, or eyes)",
3131
"enum": [
3232
"+1",
3333
"-1",

‎pkg/github/__toolsnaps__/create_pull_request_review.snap‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"type": "string"
3131
},
3232
"event": {
33-
"description": "The review action to perform. If omitted, creates a pending review.",
33+
"description": "The review action to perform (APPROVE, REQUEST_CHANGES, or COMMENT). If omitted, creates a pending review.",
3434
"enum": [
3535
"APPROVE",
3636
"REQUEST_CHANGES",

‎pkg/github/__toolsnaps__/submit_pending_pull_request_review.snap‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"type": "string"
2727
},
2828
"event": {
29-
"description": "The review action to perform",
29+
"description": "The review action to perform (APPROVE, REQUEST_CHANGES, or COMMENT)",
3030
"enum": [
3131
"APPROVE",
3232
"REQUEST_CHANGES",

‎pkg/github/__toolsnaps__/update_pull_request_state.snap‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"x-mcp-header": "repo"
3838
},
3939
"state": {
40-
"description": "The new state for the pull request",
40+
"description": "The new state for the pull request (open or closed)",
4141
"enum": [
4242
"open",
4343
"closed"

‎pkg/github/pullrequests_granular.go‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ func GranularUpdatePullRequestState(t translations.TranslationHelperFunc) invent
164164
map[string]*jsonschema.Schema{
165165
"state": {
166166
Type: "string",
167-
Description: "The new state for the pull request",
167+
Description: "The new state for the pull request (open or closed)",
168168
Enum: GranularPullRequestState("").JSONSchema().Enum,
169169
},
170170
},
@@ -363,7 +363,7 @@ func GranularCreatePullRequestReview(t translations.TranslationHelperFunc) inven
363363
"repo": {Type: "string", Description: "Repository name"},
364364
"pullNumber": {Type: "number", Description: "The pull request number", Minimum: new(1.0)},
365365
"body": {Type: "string", Description: "The review body text (optional)"},
366-
"event": {Type: "string", Description: "The review action to perform. If omitted, creates a pending review.", Enum: GranularPullRequestReviewEvent("").JSONSchema().Enum},
366+
"event": {Type: "string", Description: "The review action to perform (APPROVE, REQUEST_CHANGES, or COMMENT). If omitted, creates a pending review.", Enum: GranularPullRequestReviewEvent("").JSONSchema().Enum},
367367
"commitID": {Type: "string", Description: "The SHA of the commit to review (optional, defaults to latest)"},
368368
},
369369
Required: []string{"owner", "repo", "pullNumber"},
@@ -419,7 +419,7 @@ func GranularSubmitPendingPullRequestReview(t translations.TranslationHelperFunc
419419
"owner": {Type: "string", Description: "Repository owner (username or organization)"},
420420
"repo": {Type: "string", Description: "Repository name"},
421421
"pullNumber": {Type: "number", Description: "The pull request number", Minimum: new(1.0)},
422-
"event": {Type: "string", Description: "The review action to perform", Enum: GranularPullRequestReviewEvent("").JSONSchema().Enum},
422+
"event": {Type: "string", Description: "The review action to perform (APPROVE, REQUEST_CHANGES, or COMMENT)", Enum: GranularPullRequestReviewEvent("").JSONSchema().Enum},
423423
"body": {Type: "string", Description: "The review body text (optional)"},
424424
},
425425
Required: []string{"owner", "repo", "pullNumber", "event"},
@@ -515,11 +515,11 @@ func GranularAddPullRequestReviewComment(t translations.TranslationHelperFunc) i
515515
"pullNumber": {Type: "number", Description: "The pull request number", Minimum: new(1.0)},
516516
"path": {Type: "string", Description: "The relative path of the file to comment on"},
517517
"body": {Type: "string", Description: "The comment body"},
518-
"subjectType": {Type: "string", Description: "The subject type of the comment", Enum: GranularPullRequestCommentSubject("").JSONSchema().Enum},
518+
"subjectType": {Type: "string", Description: "The subject type of the comment (FILE or LINE)", Enum: GranularPullRequestCommentSubject("").JSONSchema().Enum},
519519
"line": {Type: "number", Description: "The line number in the diff to comment on (optional)"},
520-
"side": {Type: "string", Description: "The side of the diff to comment on (optional)", Enum: GranularPullRequestDiffSide("").JSONSchema().Enum},
520+
"side": {Type: "string", Description: "The side of the diff to comment on (LEFT or RIGHT, optional)", Enum: GranularPullRequestDiffSide("").JSONSchema().Enum},
521521
"startLine": {Type: "number", Description: "The start line of a multi-line comment (optional)"},
522-
"startSide": {Type: "string", Description: "The start side of a multi-line comment (optional)", Enum: GranularPullRequestDiffSide("").JSONSchema().Enum},
522+
"startSide": {Type: "string", Description: "The start side of a multi-line comment (LEFT or RIGHT, optional)", Enum: GranularPullRequestDiffSide("").JSONSchema().Enum},
523523
},
524524
Required: []string{"owner", "repo", "pullNumber", "path", "body", "subjectType"},
525525
},
@@ -742,7 +742,7 @@ func GranularAddPullRequestReviewCommentReaction(t translations.TranslationHelpe
742742
},
743743
"content": {
744744
Type: "string",
745-
Description: "The emoji reaction type",
745+
Description: "The emoji reaction type (+1, -1, laugh, confused, heart, hooray, rocket, or eyes)",
746746
Enum: PullRequestCommentReactionType("").JSONSchema().Enum,
747747
},
748748
},

0 commit comments

Comments
 (0)