Skip to content

Commit cfd6136

Browse files
committed
fix: handle URL parameter types correctly in listIssues function
1 parent 8016e36 commit cfd6136

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/github/operations/issues.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,18 @@ export async function listIssues(
8787
repo: string,
8888
options: Omit<z.infer<typeof ListIssuesOptionsSchema>, "owner" | "repo">
8989
) {
90+
const urlParams: Record<string, string | undefined> = {
91+
direction: options.direction,
92+
labels: options.labels?.join(","),
93+
page: options.page?.toString(),
94+
per_page: options.per_page?.toString(),
95+
since: options.since,
96+
sort: options.sort,
97+
state: options.state
98+
};
99+
90100
return githubRequest(
91-
buildUrl(`https://api.github.com/repos/${owner}/${repo}/issues`, options)
101+
buildUrl(`https://api.github.com/repos/${owner}/${repo}/issues`, urlParams)
92102
);
93103
}
94104

0 commit comments

Comments
 (0)