Skip to content

Commit 5003123

Browse files
committed
refactor: ensure minimum issue count in query to avoid zero results
1 parent 915c84c commit 5003123

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/api/github-graphql-client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ class GitHubGraphQLClient {
245245
`
246246

247247
try {
248-
const result = await this.query<SearchResult>(query, { count: Math.floor(count / labels.length) })
248+
const result = await this.query<SearchResult>(query, { count: Math.max(1, Math.floor(count / labels.length)) })
249249
allIssues.push(...result.data.search.nodes)
250250

251251
await new Promise(resolve => setTimeout(resolve, 100))

0 commit comments

Comments
 (0)