From 622c112f7f8b1ea9e64856321e49692094caa4ef Mon Sep 17 00:00:00 2001 From: Daniel Schuba Date: Sat, 7 Jun 2025 01:20:07 +0200 Subject: [PATCH] FEAT: add support for `remove_source_branch` and `squash` options for merge requests (#86) --- index.ts | 2 ++ schemas.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/index.ts b/index.ts index f5f3da5..1ff084f 100644 --- a/index.ts +++ b/index.ts @@ -1199,6 +1199,8 @@ async function createMergeRequest( labels: options.labels?.join(","), allow_collaboration: options.allow_collaboration, draft: options.draft, + remove_source_branch: options.remove_source_branch, + squash: options.squash, }), }); diff --git a/schemas.ts b/schemas.ts index 1a8f329..fd5a132 100644 --- a/schemas.ts +++ b/schemas.ts @@ -467,6 +467,8 @@ export const CreateMergeRequestOptionsSchema = z.object({ labels: z.array(z.string()).optional(), allow_collaboration: z.boolean().optional(), // Changed from maintainer_can_modify to match GitLab API draft: z.boolean().optional(), + remove_source_branch: z.boolean().optional().describe("Flag indicating if a merge request should remove the source branch when merging."), + squash: z.boolean().optional().describe("If true, squash all commits into a single commit on merge.") }); export const GitLabDiffSchema = z.object({