FIX: get issues labels

issue: #

 ### 機能・変更内容(ユーザー観点)

 ### 影響範囲・追加でテストしてほしい内容

 ### tech側でテストした内容
This commit is contained in:
iwakitakuma33
2025-06-02 20:03:54 +09:00
parent 63d666739c
commit 2a9b8f1a25
2 changed files with 6 additions and 4 deletions

View File

@ -901,11 +901,13 @@ async function listIssues(
// Add all query parameters
Object.entries(options).forEach(([key, value]) => {
if (value !== undefined) {
if (key === "label_name" && Array.isArray(value)) {
if (key === "labels" && Array.isArray(value)) {
// Handle array of labels
url.searchParams.append(key, value.join(","));
value.forEach(label => {
url.searchParams.append("labels[]", label.toString());
});
} else {
url.searchParams.append(key, value.toString());
url.searchParams.append("labels[]", value.toString());
}
}
});

View File

@ -890,7 +890,7 @@ export const ListIssuesSchema = z.object({
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"),
due_date: z.string().optional().describe("Return issues that have the due date"),
label_name: z.array(z.string()).optional().describe("Array of label names"),
labels: z.array(z.string()).optional().describe("Array of label names"),
milestone: z.string().optional().describe("Milestone title"),
scope: z
.enum(["created-by-me", "assigned-to-me", "all"])