Compare commits
5 Commits
fix/get_is
...
1.0.60
Author | SHA1 | Date | |
---|---|---|---|
44d8d11b4a | |||
622c112f7f | |||
0930ce3636 | |||
061e19d861 | |||
511d2d9c06 |
9
index.ts
9
index.ts
@ -907,14 +907,15 @@ async function listIssues(
|
|||||||
// Add all query parameters
|
// Add all query parameters
|
||||||
Object.entries(options).forEach(([key, value]) => {
|
Object.entries(options).forEach(([key, value]) => {
|
||||||
if (value !== undefined) {
|
if (value !== undefined) {
|
||||||
if (key === "labels" ) {
|
const keys = ["labels", "assignee_username"];
|
||||||
|
if ( keys.includes(key)) {
|
||||||
if (Array.isArray(value)) {
|
if (Array.isArray(value)) {
|
||||||
// Handle array of labels
|
// Handle array of labels
|
||||||
value.forEach(label => {
|
value.forEach(label => {
|
||||||
url.searchParams.append("labels[]", label.toString());
|
url.searchParams.append(`${key}[]`, label.toString());
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
url.searchParams.append("labels[]", value.toString());
|
url.searchParams.append(`${key}[]`, value.toString());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
url.searchParams.append(key, value.toString());
|
url.searchParams.append(key, value.toString());
|
||||||
@ -1199,6 +1200,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,
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@zereight/mcp-gitlab",
|
"name": "@zereight/mcp-gitlab",
|
||||||
"version": "1.0.58",
|
"version": "1.0.59",
|
||||||
"description": "MCP server for using the GitLab API",
|
"description": "MCP server for using the GitLab API",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"author": "zereight",
|
"author": "zereight",
|
||||||
|
@ -212,7 +212,7 @@ export const GitLabUsersResponseSchema = z.record(
|
|||||||
id: z.number(),
|
id: z.number(),
|
||||||
username: z.string(),
|
username: z.string(),
|
||||||
name: z.string(),
|
name: z.string(),
|
||||||
avatar_url: z.string(),
|
avatar_url: z.string().nullable(),
|
||||||
web_url: z.string(),
|
web_url: z.string(),
|
||||||
}).nullable()
|
}).nullable()
|
||||||
);
|
);
|
||||||
@ -253,7 +253,7 @@ export const GitLabNamespaceExistsResponseSchema = z.object({
|
|||||||
export const GitLabOwnerSchema = z.object({
|
export const GitLabOwnerSchema = z.object({
|
||||||
username: z.string(), // Changed from login to match GitLab API
|
username: z.string(), // Changed from login to match GitLab API
|
||||||
id: z.number(),
|
id: z.number(),
|
||||||
avatar_url: z.string(),
|
avatar_url: z.string().nullable(),
|
||||||
web_url: z.string(), // Changed from html_url to match GitLab API
|
web_url: z.string(), // Changed from html_url to match GitLab API
|
||||||
name: z.string(), // Added as GitLab includes full name
|
name: z.string(), // Added as GitLab includes full name
|
||||||
state: z.string(), // Added as GitLab includes user state
|
state: z.string(), // Added as GitLab includes user state
|
||||||
@ -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({
|
||||||
@ -593,7 +595,7 @@ export const GitLabForkParentSchema = z.object({
|
|||||||
.object({
|
.object({
|
||||||
username: z.string(), // Changed from login to match GitLab API
|
username: z.string(), // Changed from login to match GitLab API
|
||||||
id: z.number(),
|
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
|
.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
|
web_url: z.string(), // Changed from html_url to match GitLab API
|
||||||
|
Reference in New Issue
Block a user