From 4489c3bbdce7c0c02b0a5ae59ad8710aaee64307 Mon Sep 17 00:00:00 2001 From: Toby Padilla Date: Mon, 24 Mar 2025 17:13:06 -0600 Subject: [PATCH] fix: add required fields for OpenAI API --- pkg/github/pullrequests.go | 4 +++- pkg/github/repositories.go | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pkg/github/pullrequests.go b/pkg/github/pullrequests.go index e5918257..fc77cade 100644 --- a/pkg/github/pullrequests.go +++ b/pkg/github/pullrequests.go @@ -591,7 +591,9 @@ func createPullRequestReview(client *github.Client, t translations.TranslationHe mcp.WithArray("comments", mcp.Items( map[string]interface{}{ - "type": "object", + "type": "object", + "additionalProperties": false, + "required": []string{"path", "position", "body"}, "properties": map[string]interface{}{ "path": map[string]interface{}{ "type": "string", diff --git a/pkg/github/repositories.go b/pkg/github/repositories.go index 5a4bef0f..e4302b88 100644 --- a/pkg/github/repositories.go +++ b/pkg/github/repositories.go @@ -488,7 +488,9 @@ func pushFiles(client *github.Client, t translations.TranslationHelperFunc) (too mcp.Required(), mcp.Items( map[string]interface{}{ - "type": "object", + "type": "object", + "additionalProperties": false, + "required": []string{"path", "content"}, "properties": map[string]interface{}{ "path": map[string]interface{}{ "type": "string",