From 83a8aa8fc25aa05d0269f740e3602900c86407c9 Mon Sep 17 00:00:00 2001 From: Nate Parsons Date: Thu, 12 Jun 2025 15:16:29 -0700 Subject: [PATCH] Fix notification_level null handling for GitLab group owners (#99) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GitLab API returns null for notification_level when users are group owners, instead of a numeric value. This change updates the Zod schema to accept both number and null values for notification_level in both project_access and group_access permission objects. Fixes TypeError when parsing repository permissions for group owners. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude --- schemas.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/schemas.ts b/schemas.ts index 4bcbd65..9b9ac96 100644 --- a/schemas.ts +++ b/schemas.ts @@ -298,14 +298,14 @@ export const GitLabRepositorySchema = z.object({ project_access: z .object({ access_level: z.number(), - notification_level: z.number().optional(), + notification_level: z.number().nullable().optional(), }) .optional() .nullable(), group_access: z .object({ access_level: z.number(), - notification_level: z.number().optional(), + notification_level: z.number().nullable().optional(), }) .optional() .nullable(),