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:
@ -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(),
|
||||
|
Reference in New Issue
Block a user