Skip to content

fix: use anyOf instead of nullable type array #325

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 21, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions pkg/github/pullrequests.go
Original file line number Diff line number Diff line change
Expand Up @@ -915,23 +915,38 @@ func CreatePullRequestReview(getClient GetClientFn, t translations.TranslationHe
"description": "path to the file",
},
"position": map[string]interface{}{
"type": []string{"number", "null"},
"anyOf": []interface{}{
map[string]string{"type": "number"},
map[string]string{"type": "null"},
},
"description": "position of the comment in the diff",
},
"line": map[string]interface{}{
"type": []string{"number", "null"},
"anyOf": []interface{}{
map[string]string{"type": "number"},
map[string]string{"type": "null"},
},
"description": "line number in the file to comment on. For multi-line comments, the end of the line range",
},
"side": map[string]interface{}{
"type": []string{"string", "null"},
"anyOf": []interface{}{
map[string]string{"type": "string"},
map[string]string{"type": "null"},
},
"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)",
},
"start_line": map[string]interface{}{
"type": []string{"number", "null"},
"anyOf": []interface{}{
map[string]string{"type": "number"},
map[string]string{"type": "null"},
},
"description": "The first line of the range to which the comment refers. Required for multi-line comments.",
},
"start_side": map[string]interface{}{
"type": []string{"string", "null"},
"anyOf": []interface{}{
map[string]string{"type": "string"},
map[string]string{"type": "null"},
},
"description": "The side of the diff on which the start line resides for multi-line comments. (LEFT or RIGHT)",
},
"body": map[string]interface{}{
Expand Down