Compare commits

..

1 Commits

2 changed files with 5 additions and 7 deletions

View File

@ -901,13 +901,11 @@ 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" && Array.isArray(value)) { if (key === "label_name" && Array.isArray(value)) {
// Handle array of labels // Handle array of labels
value.forEach(label => { url.searchParams.append(key, value.join(","));
url.searchParams.append("labels[]", label.toString());
});
} else { } else {
url.searchParams.append("labels[]", value.toString()); url.searchParams.append(key, value.toString());
} }
} }
}); });

View File

@ -890,10 +890,10 @@ export const ListIssuesSchema = z.object({
created_after: z.string().optional().describe("Return issues created after the given time"), created_after: z.string().optional().describe("Return issues created after the given time"),
created_before: z.string().optional().describe("Return issues created before the given time"), created_before: z.string().optional().describe("Return issues created before the given time"),
due_date: z.string().optional().describe("Return issues that have the due date"), due_date: z.string().optional().describe("Return issues that have the due date"),
labels: z.array(z.string()).optional().describe("Array of label names"), label_name: z.array(z.string()).optional().describe("Array of label names"),
milestone: z.string().optional().describe("Milestone title"), milestone: z.string().optional().describe("Milestone title"),
scope: z scope: z
.enum(["created-by-me", "assigned-to-me", "all"]) .enum(["created_by_me", "assigned_to_me", "all"])
.optional() .optional()
.describe("Return issues from a specific scope"), .describe("Return issues from a specific scope"),
search: z.string().optional().describe("Search for specific terms"), search: z.string().optional().describe("Search for specific terms"),