mirror of
https://github.com/tiennm99/ghglance.git
synced 2026-10-19 16:15:42 +00:00
feat: seed-based repo scanning + fork/private visibility flags
Replace the top-10-starred sampling with a seed list built from
contributionsCollection.commitContributionsByRepository, unioned across
every active contributionYear. Commit-history probes now land only on
repos where the user actually committed, covering all owned repos plus
forks and repos owned by others when allowed.
New visibility knobs (default off — public-facing READMEs stay
safe):
- -include-forks / include_forks : include forked repos
- -include-private / include_private: include private repos (requires
PAT with repo scope)
Compatibility:
- -top-repos default changed 10 → 0 (unlimited); still usable as a cap
for fast local runs.
- commitHistoryQuery now takes $owner so probes can target forks or
repos outside the user's ownership.
- FetchProfile now accepts FetchOptions; PublicRepos counts only repos
that pass the visibility filter.
Seed-list approach mirrors github-profile-summary-cards' own repo
sourcing but keeps our byte-weighted commit attribution.
This commit is contained in:
1 parent
0f54d5e885
commit
2943db667c
8 files changed
+179
-57
No files matched your search
@@ -56,8 +56,12 @@ func (c *Client) FetchProductive(p *Profile, repos []RepoInfo, loc *time.Locatio
|
||||
if seen >= maxPerRepo {
|
||||
break
|
||||
}
|
||||
owner := repo.Owner
|
||||
if owner == "" {
|
||||
owner = p.Login
|
||||
}
|
||||
vars := map[string]any{
|
||||
"login": p.Login,
|
||||
"owner": owner,
|
||||
"repo": repo.Name,
|
||||
"userId": p.ID,
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user