Skip to content

Match daily commits to GitHub's weekly stats - #24

Merged
adampeterhiggins merged 2 commits into
mainfrom
ah/fix-daily-commit-calculation
Oct 24, 2026
Merged

adampeterhiggins merged 2 commits into
mainfrom
ah/fix-daily-commit-calculation

Conversation

@adampeterhiggins

@adampeterhiggins adampeterhiggins commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Daily commits now credit every account GitHub's weekly stats credit: the git author and each resolved co-author, excluding merges and empty commits. The walk uses GraphQL Commit.authors, which is the same resolution the contributor graph uses.
  • The first sync, a full re-sync, and a backfill read the whole default branch. Incremental syncs still start from the checkpoint. The 365-day window stays on pull requests, issues, and Actions.
  • Existing logs are kept and marked legacy. Settings → Sync shows Backfill daily commits, which re-reads only that history for the repositories still on the old fetch. A second run continues with whatever the last one did not finish.

Test plan

  • Open Settings → Sync on a repository that was synced before this change and confirm the backfill notice appears there, and not on Contributors.
  • Run Backfill daily commits for focaldata/orchestra and confirm the daily cumulative total meets the weekly one (about 4,526 for the current contributor filter), including commits from before October 2025.
  • Hover a recent day and a week in June 2026 and confirm co-authored commits (you, claude, cursoragent) are counted on the daily series the way the weekly series counts them.
  • Sync changes again and confirm it does not re-walk the whole history, and that the notice stays gone.
  • Cancel a backfill part way through and run it again; finished repositories should be skipped.

adampeterhiggins and others added 2 commits October 24, 2026 17:47
The daily log counted only the git author, and only the last year, so it fell short of the contributor stats. Walk the whole default branch, credit every resolved co-author, and offer a backfill that re-reads just those commits.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@adampeterhiggins
adampeterhiggins merged commit 52d41be into main Oct 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant