diff --git a/.github/workflows/update-health-dashboard.yml b/.github/workflows/update-health-dashboard.yml index 39dec9d803..b1bdcb9cb2 100644 --- a/.github/workflows/update-health-dashboard.yml +++ b/.github/workflows/update-health-dashboard.yml @@ -36,17 +36,31 @@ jobs: console.log(`Fetching health metrics for ${owner}/${repo}`); - // Fetch open issues - const { data: openIssues } = await github.rest.issues.listForRepo({ - owner, - repo, - state: 'open', - per_page: 100 - }); + // Fetch ALL open issues with pagination + let allOpenIssues = []; + let page = 1; + let hasMore = true; + + while (hasMore) { + const { data: pageIssues } = await github.rest.issues.listForRepo({ + owner, + repo, + state: 'open', + per_page: 100, + page: page + }); + + allOpenIssues = allOpenIssues.concat(pageIssues); + hasMore = pageIssues.length === 100; + page++; + } + + console.log(`Fetched ${allOpenIssues.length} total open items (issues + PRs)`); // Filter out PRs (issues API includes PRs) - const issues = openIssues.filter(issue => !issue.pull_request); + const issues = allOpenIssues.filter(issue => !issue.pull_request); const totalOpenIssues = issues.length; + console.log(`Found ${totalOpenIssues} open issues (excluding PRs)`); // Count issues without labels (recent ones) const issuesWithoutLabels = issues.filter(issue => issue.labels.length === 0);