Compare commits

..

5 Commits

Author SHA1 Message Date
44d8d11b4a FIX: list issues assginee username (#87) 2025-06-07 08:20:20 +09:00
622c112f7f FEAT: add support for remove_source_branch and squash options for merge requests (#86) 2025-06-07 08:20:07 +09:00
0930ce3636 [version-update] feat: bump version to 1.0.59 🎉
🚀 Breaking Changes:
- Updated package version from 1.0.58 to 1.0.59
2025-06-04 21:37:59 +09:00
061e19d861 Fix for null error (#85)
Co-authored-by: Jean Paul Gatt <jeanpaul.gatt@ballys.com>
2025-06-04 21:37:28 +09:00
511d2d9c06 FIX: bug get issues (#83) 2025-06-04 21:37:14 +09:00
3 changed files with 12 additions and 7 deletions

View File

@ -907,14 +907,15 @@ async function listIssues(
// Add all query parameters
Object.entries(options).forEach(([key, value]) => {
if (value !== undefined) {
if (key === "labels" ) {
const keys = ["labels", "assignee_username"];
if ( keys.includes(key)) {
if (Array.isArray(value)) {
// Handle array of labels
value.forEach(label => {
url.searchParams.append("labels[]", label.toString());
url.searchParams.append(`${key}[]`, label.toString());
});
} else {
url.searchParams.append("labels[]", value.toString());
url.searchParams.append(`${key}[]`, value.toString());
}
} else {
url.searchParams.append(key, value.toString());
@ -1199,6 +1200,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,
}),
});

View File

@ -1,6 +1,6 @@
{
"name": "@zereight/mcp-gitlab",
"version": "1.0.58",
"version": "1.0.59",
"description": "MCP server for using the GitLab API",
"license": "MIT",
"author": "zereight",

View File

@ -212,7 +212,7 @@ export const GitLabUsersResponseSchema = z.record(
id: z.number(),
username: z.string(),
name: z.string(),
avatar_url: z.string(),
avatar_url: z.string().nullable(),
web_url: z.string(),
}).nullable()
);
@ -253,7 +253,7 @@ export const GitLabNamespaceExistsResponseSchema = z.object({
export const GitLabOwnerSchema = z.object({
username: z.string(), // Changed from login to match GitLab API
id: z.number(),
avatar_url: z.string(),
avatar_url: z.string().nullable(),
web_url: z.string(), // Changed from html_url to match GitLab API
name: z.string(), // Added as GitLab includes full name
state: z.string(), // Added as GitLab includes user state
@ -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({
@ -593,7 +595,7 @@ export const GitLabForkParentSchema = z.object({
.object({
username: z.string(), // Changed from login to match GitLab API
id: z.number(),
avatar_url: z.string(),
avatar_url: z.string().nullable(),
})
.optional(), // Made optional to handle cases where GitLab API doesn't include it
web_url: z.string(), // Changed from html_url to match GitLab API