Fix patch review schema

Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
This commit is contained in:
Rūdolfs Ošiņš
2023-04-26 10:42:00 +02:00
parent 3a4a766cfa
commit 518b821250
+3 -3
View File
@@ -73,14 +73,14 @@ type Verdict = "accept" | "reject";
export interface Review {
verdict?: Verdict | null;
comment?: string;
comment?: string | null;
inline: CodeComment[];
timestamp: number;
}
const reviewSchema = strictObject({
verdict: optional(union([literal("accept"), literal("reject")])).nullable(),
comment: optional(string()),
verdict: optional(union([literal("accept"), literal("reject")]).nullable()),
comment: optional(string().nullable()),
inline: array(codeCommentSchema),
timestamp: number(),
}) satisfies ZodSchema<Review>;