fix(gitlab): Invalid arguments error when using v4 API for gitlab.com

Make 'merged' property optional and 'diff_refs' nullable in the `GitLabMergeRequestSchema` to align with GitLab V4 API specifications.
This commit is contained in:
Franco Valerio
2025-03-09 20:04:52 -03:00
parent 941266c05a
commit 8fe9b4768a

View File

@@ -218,12 +218,12 @@ export const GitLabMergeRequestSchema = z.object({
title: z.string(),
description: z.string(), // Changed from body to match GitLab API
state: z.string(),
merged: z.boolean(),
merged: z.boolean().optional(),
author: GitLabUserSchema,
assignees: z.array(GitLabUserSchema),
source_branch: z.string(), // Changed from head to match GitLab API
target_branch: z.string(), // Changed from base to match GitLab API
diff_refs: GitLabMergeRequestDiffRefSchema,
diff_refs: GitLabMergeRequestDiffRefSchema.nullable(),
web_url: z.string(), // Changed from html_url to match GitLab API
created_at: z.string(),
updated_at: z.string(),