Fix notification_level null handling for GitLab group owners (#99)

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 <noreply@anthropic.com>
This commit is contained in:
Nate Parsons
2025-06-12 15:16:29 -07:00
committed by GitHub
parent 8d706275e6
commit 83a8aa8fc2

View File

@ -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(),