You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add line parameter support to create_pull_request_review tool
- Updated schema to make path and body the only required fields
- Added line parameter as alternative to position for inline comments
- Updated handler to accept either position or line based on GitHub API spec
- Added new test case that verifies line parameter works properly
- Updated error messages for better validation
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
-`commitId`: SHA of commit to review (string, optional)
269
-
-`comments`: Line-specific comments array of objects, each object with path (string), position (number), and body (string) (array, optional)
269
+
-`comments`: Line-specific comments array of objects, each object with path (string), either position (number) or line (number), and body (string) (array, optional)
270
270
271
271
-**create_pull_request** - Create a new pull request
Copy file name to clipboardExpand all lines: pkg/github/pullrequests.go
+26-15
Original file line number
Diff line number
Diff line change
@@ -593,15 +593,19 @@ func createPullRequestReview(client *github.Client, t translations.TranslationHe
593
593
map[string]interface{}{
594
594
"type": "object",
595
595
"additionalProperties": false,
596
-
"required": []string{"path", "position", "body"},
596
+
"required": []string{"path", "body"},
597
597
"properties": map[string]interface{}{
598
598
"path": map[string]interface{}{
599
599
"type": "string",
600
600
"description": "path to the file",
601
601
},
602
602
"position": map[string]interface{}{
603
603
"type": "number",
604
-
"description": "line number in the file",
604
+
"description": "position of the comment in the diff",
605
+
},
606
+
"line": map[string]interface{}{
607
+
"type": "number",
608
+
"description": "line number in the file to comment on (alternative to position)",
605
609
},
606
610
"body": map[string]interface{}{
607
611
"type": "string",
@@ -610,7 +614,7 @@ func createPullRequestReview(client *github.Client, t translations.TranslationHe
610
614
},
611
615
},
612
616
),
613
-
mcp.Description("Line-specific comments array of objects, each object with path (string), position (number), and body (string)"),
617
+
mcp.Description("Line-specific comments array of objects, each object with path (string), either position (number) or line (number), and body (string)"),
0 commit comments