Skip to content

Commit 20714af

Browse files
committed
Change old_line and new_line in GitLabDiscussionNoteSchema to allow optional values
1 parent 3ce688b commit 20714af

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

schemas.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -618,21 +618,21 @@ export const GitLabDiscussionNoteSchema = z.object({
618618
old_path: z.string(),
619619
new_path: z.string(),
620620
position_type: z.enum(["text", "image", "file"]),
621-
old_line: z.number().nullable(),
622-
new_line: z.number().nullable(),
621+
old_line: z.number().nullish(), // This is missing for image diffs
622+
new_line: z.number().nullish(), // This is missing for image diffs
623623
line_range: z
624624
.object({
625625
start: z.object({
626626
line_code: z.string(),
627627
type: z.enum(["new", "old", "expanded"]),
628-
old_line: z.number().nullable(),
629-
new_line: z.number().nullable(),
628+
old_line: z.number().nullish(), // This is missing for image diffs
629+
new_line: z.number().nullish(), // This is missing for image diffs
630630
}),
631631
end: z.object({
632632
line_code: z.string(),
633633
type: z.enum(["new", "old", "expanded"]),
634-
old_line: z.number().nullable(),
635-
new_line: z.number().nullable(),
634+
old_line: z.number().nullish(), // This is missing for image diffs
635+
new_line: z.number().nullish(), // This is missing for image diffs
636636
}),
637637
})
638638
.nullable()

0 commit comments

Comments
 (0)