FIX: get issues labels
issue: # ### 機能・変更内容(ユーザー観点) ### 影響範囲・追加でテストしてほしい内容 ### tech側でテストした内容
This commit is contained in:
8
index.ts
8
index.ts
@ -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());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -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"])
|
||||
|
Reference in New Issue
Block a user