File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -112,11 +112,20 @@ export const CreatePullRequestReviewSchema = z.object({
112
112
commit_id : z . string ( ) . optional ( ) . describe ( "The SHA of the commit that needs a review" ) ,
113
113
body : z . string ( ) . describe ( "The body text of the review" ) ,
114
114
event : z . enum ( [ 'APPROVE' , 'REQUEST_CHANGES' , 'COMMENT' ] ) . describe ( "The review action to perform" ) ,
115
- comments : z . array ( z . object ( {
116
- path : z . string ( ) . describe ( "The relative path to the file being commented on" ) ,
117
- position : z . number ( ) . describe ( "The position in the diff where you want to add a review comment" ) ,
118
- body : z . string ( ) . describe ( "Text of the review comment" )
119
- } ) ) . optional ( ) . describe ( "Comments to post as part of the review" )
115
+ comments : z . array (
116
+ z . union ( [
117
+ z . object ( {
118
+ path : z . string ( ) . describe ( "The relative path to the file being commented on" ) ,
119
+ position : z . number ( ) . describe ( "The position in the diff where you want to add a review comment" ) ,
120
+ body : z . string ( ) . describe ( "Text of the review comment" )
121
+ } ) ,
122
+ z . object ( {
123
+ path : z . string ( ) . describe ( "The relative path to the file being commented on" ) ,
124
+ line : z . number ( ) . describe ( "The line number in the file where you want to add a review comment" ) ,
125
+ body : z . string ( ) . describe ( "Text of the review comment" )
126
+ } )
127
+ ] )
128
+ ) . optional ( ) . describe ( "Comments to post as part of the review (specify either position or line, not both)" )
120
129
} ) ;
121
130
122
131
export const MergePullRequestSchema = z . object ( {
You can’t perform that action at this time.
0 commit comments