Skip to content

Commit

Permalink
fix(gitlab): Invalid arguments error when using v4 API for gitlab.com
Browse files Browse the repository at this point in the history
Make 'merged' property optional and 'diff_refs' nullable and optional in the `GitLabMergeRequestSchema` to align with GitLab V4 API specifications.
  • Loading branch information
francovp committed Mar 9, 2025
1 parent 941266c commit 4c86993
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gitlab/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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().optional(),
web_url: z.string(), // Changed from html_url to match GitLab API
created_at: z.string(),
updated_at: z.string(),
Expand Down

0 comments on commit 4c86993

Please sign in to comment.