FEAT: add support for remove_source_branch and squash options for merge requests (#86)

This commit is contained in:
Daniel Schuba
2025-06-07 01:20:07 +02:00
committed by GitHub
parent 0930ce3636
commit 622c112f7f
2 changed files with 4 additions and 0 deletions

View File

@ -1199,6 +1199,8 @@ async function createMergeRequest(
labels: options.labels?.join(","), labels: options.labels?.join(","),
allow_collaboration: options.allow_collaboration, allow_collaboration: options.allow_collaboration,
draft: options.draft, draft: options.draft,
remove_source_branch: options.remove_source_branch,
squash: options.squash,
}), }),
}); });

View File

@ -467,6 +467,8 @@ export const CreateMergeRequestOptionsSchema = z.object({
labels: z.array(z.string()).optional(), labels: z.array(z.string()).optional(),
allow_collaboration: z.boolean().optional(), // Changed from maintainer_can_modify to match GitLab API allow_collaboration: z.boolean().optional(), // Changed from maintainer_can_modify to match GitLab API
draft: z.boolean().optional(), 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({ export const GitLabDiffSchema = z.object({