feat: let commits-per-repo 0 mean every commit

The pagination guard broke on seen >= maxPerRepo, so a cap of 0 stopped
before the first page and rendered empty productive-time,
productive-weekday and most-commit-language cards. That inverted the
meaning 0 carries for top-repos, where it already means unlimited.

Treat a cap of 0 or less as no cap. Verified against a real repo: a cap
of 100 still stops at 100, while 500 and 0 both walk the full 382-commit
history.
This commit is contained in:
tiennm99 committed 2026-08-13 14:19:41 +07:00
1 parent 9e0387f307
commit 7c081ac591
6 files changed
+47 -8

No files matched your search

+1 -1
View File
@@ -49,7 +49,7 @@ FetchContributionsAllTime(ctx, profile, opts)
│ TotalCommitsAllTime
│
▼
FetchProductive(ctx, profile, profile.SeedRepos, loc, commitsPerRepo)
FetchProductive(ctx, profile, profile.SeedRepos, loc, commitsPerRepo) // 0 = no cap
│ commitHistoryQuery × (#seeds × pages)
│ per commit: t = committedDate in loc
│ ProductiveAllTime[t.Hour]++