implement per-repo enumeration for full commit history #1
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The current GitHub Search-based backfill is hard-capped at 1000 results per query (most-recent 1000 commits + most-recent 1000 issues/PRs). Older history is unreachable through
/search/commits?q=author:grenade.To recover the rest, add a new
EventSourceimpl that enumerates the user's owned/contributed repos and walks per-repo/repos/{owner}/{repo}/commits?author=<user>— that endpoint has no 1000-cap.Approach
crates/moments-data/src/github_repo.rs/user/repos?affiliation=owner,collaborator,organization_member&visibility=all&per_page=100(paginated)./repos/{owner}/{repo}/commits?author=<user>&per_page=100(paginated, no Search-API cap).github-commit:<sha>(matchesGithubSearchSource's scheme — same row, idempotent upsert).privatefield at enumeration time.Cost
O(repos × commits/repo) calls. Roughly 100 repos × 1000 commits at 100/page = ~1000 API calls. Well within the 5000/hr authed budget but slow. One-time mostly.
When
Deferred. The Search-API source already gives a meaningful starting set (the most-recent 1000 of each kind). Revisit if the gap shows up as missing entries on the timeline that the user actually cares about.