Skip to content

Commit 22e4936

Browse files
tobySamMorrowDrums
andauthored
fix: update json schema for create_pull_request_review to make OpenAI compatible (#300)
Co-authored-by: Sam Morrow <info@sam-morrow.com>
1 parent 54bd5ec commit 22e4936

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pkg/github/pullrequests.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -908,30 +908,30 @@ func CreatePullRequestReview(getClient GetClientFn, t translations.TranslationHe
908908
map[string]interface{}{
909909
"type": "object",
910910
"additionalProperties": false,
911-
"required": []string{"path", "body"},
911+
"required": []string{"path", "body", "position", "line", "side", "start_line", "start_side"},
912912
"properties": map[string]interface{}{
913913
"path": map[string]interface{}{
914914
"type": "string",
915915
"description": "path to the file",
916916
},
917917
"position": map[string]interface{}{
918-
"type": "number",
918+
"type": []string{"number", "null"},
919919
"description": "position of the comment in the diff",
920920
},
921921
"line": map[string]interface{}{
922-
"type": "number",
922+
"type": []string{"number", "null"},
923923
"description": "line number in the file to comment on. For multi-line comments, the end of the line range",
924924
},
925925
"side": map[string]interface{}{
926-
"type": "string",
926+
"type": []string{"string", "null"},
927927
"description": "The side of the diff on which the line resides. For multi-line comments, this is the side for the end of the line range. (LEFT or RIGHT)",
928928
},
929929
"start_line": map[string]interface{}{
930-
"type": "number",
930+
"type": []string{"number", "null"},
931931
"description": "The first line of the range to which the comment refers. Required for multi-line comments.",
932932
},
933933
"start_side": map[string]interface{}{
934-
"type": "string",
934+
"type": []string{"string", "null"},
935935
"description": "The side of the diff on which the start line resides for multi-line comments. (LEFT or RIGHT)",
936936
},
937937
"body": map[string]interface{}{

0 commit comments

Comments
 (0)