Skip to content

fix: base open-discovery repo warning on unique repos#973

Open
hera8939 wants to merge 1 commit intoentrius:testfrom
hera8939:fix/open-discovery-repo-limit-warning
Open

fix: base open-discovery repo warning on unique repos#973
hera8939 wants to merge 1 commit intoentrius:testfrom
hera8939:fix/open-discovery-repo-limit-warning

Conversation

@hera8939
Copy link
Copy Markdown

@hera8939 hera8939 commented May 7, 2026

Summary

Closes #972.

Fixes the Miner Details open-discovery repo-limit warning so it is based on the number of unique repositories eligible for scanning, not the raw PR count.

The scan helper already de-duplicates PRs by repository before applying the 50-repository cap. The UI warning now uses that same uncapped unique repository count, so miners with many PRs in a small number of repositories no longer see a false repo-limit warning.

Changes

  • Add selectMinerIssueScanRepoSummary() to return both capped scan repos and uncapped unique repository count.
  • Keep selectMinerIssueScanRepos() as the existing capped-list API.
  • Update MinerOpenDiscoveryIssuesByRepo to show the repo-limit warning only when unique repositories exceed the fetch limit.
  • Add regression tests for many PRs in few repos and more than 50 unique repos.

Testing

npm test -- --run src/tests/useMinerRepositoriesOpenIssues.test.ts
npx prettier --check src/hooks/useMinerRepositoriesOpenIssues.ts src/components/miners/MinerOpenDiscoveryIssuesByRepo.tsx src/tests/useMinerRepositoriesOpenIssues.test.ts
npx eslint src/hooks/useMinerRepositoriesOpenIssues.ts src/components/miners/MinerOpenDiscoveryIssuesByRepo.tsx src/tests/useMinerRepositoriesOpenIssues.test.ts --ext ts,tsx --max-warnings 0
npm run build

@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Miner open-discovery repo-limit warning uses PR count instead of unique repository count

1 participant