Skip to content

Commit af22499

Browse files
authored
fix array schemas (github#37)
1 parent e426b6e commit af22499

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

pkg/github/pullrequests.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,25 @@ func createPullRequestReview(client *github.Client, t translations.TranslationHe
522522
mcp.Description("SHA of commit to review"),
523523
),
524524
mcp.WithArray("comments",
525+
mcp.Items(
526+
map[string]interface{}{
527+
"type": "object",
528+
"properties": map[string]interface{}{
529+
"path": map[string]interface{}{
530+
"type": "string",
531+
"description": "path to the file",
532+
},
533+
"position": map[string]interface{}{
534+
"type": "number",
535+
"description": "line number in the file",
536+
},
537+
"body": map[string]interface{}{
538+
"type": "string",
539+
"description": "comment body",
540+
},
541+
},
542+
},
543+
),
525544
mcp.Description("Line-specific comments array of objects, each object with path (string), position (number), and body (string)"),
526545
),
527546
),

pkg/github/repositories.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,20 @@ func pushFiles(client *github.Client, t translations.TranslationHelperFunc) (too
432432
),
433433
mcp.WithArray("files",
434434
mcp.Required(),
435+
mcp.Items(
436+
map[string]interface{}{
437+
"type": "object",
438+
"properties": map[string]interface{}{
439+
"path": map[string]interface{}{
440+
"type": "string",
441+
"description": "path to the file",
442+
},
443+
"content": map[string]interface{}{
444+
"type": "string",
445+
"description": "file content",
446+
},
447+
},
448+
}),
435449
mcp.Description("Array of file objects to push, each object with path (string) and content (string)"),
436450
),
437451
mcp.WithString("message",

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy