Compare commits

..

1 Commits

Author SHA1 Message Date
66d53f508c FIX: bug get issues 2025-06-03 22:57:08 +09:00
3 changed files with 7 additions and 8 deletions

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "@zereight/mcp-gitlab",
"version": "1.0.59",
"version": "1.0.58",
"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().nullable(),
avatar_url: z.string(),
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().nullable(),
avatar_url: z.string(),
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
@ -593,7 +593,7 @@ export const GitLabForkParentSchema = z.object({
.object({
username: z.string(), // Changed from login to match GitLab API
id: z.number(),
avatar_url: z.string().nullable(),
avatar_url: z.string(),
})
.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