mirror of
https://github.com/tiennm99/ghglance.git
synced 2026-10-15 10:14:52 +00:00
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:
1 parent
9e0387f307
commit
7c081ac591
6 files changed
+47
-8
No files matched your search
@@ -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]++
|
||||
|
||||
Reference in new issue
Block a user