Skip to content

Track PR associations and filter contributor commits - #25

Merged
adampeterhiggins merged 1 commit into
mainfrom
ah/track-pr-commits
Oct 24, 2026
Merged

adampeterhiggins merged 1 commit into
mainfrom
ah/track-pr-commits

Conversation

@adampeterhiggins

Copy link
Copy Markdown
Owner

Contributor commit history currently cannot distinguish commits introduced through a PR from direct pushes. This records GitHub’s Commit.associatedPullRequests alongside each credited commit and adds a persisted PR commits only control on Contributors.

The filter applies to commit timelines at every granularity, contributor totals/rankings, and repository chart splits. Squash commits are classified using GitHub’s association, rather than commit-message heuristics. It counts commits and credited co-authors, not distinct PRs. The control is available for the Commits metric; line statistics and the weekly repository numbers panel are hidden while filtering because the daily log has no line counts.

Existing databases migrate without losing history: old associations remain NULL, distinct from known direct commits. Commit-log format 3 makes older repositories eligible for Backfill daily commits, now also offered on Contributors. This re-reads full default-branch history only; incremental syncs update associations for fetched commits but cannot mark old history complete. Failed or cancelled repositories can be retried. Users need to run that backfill after installing to populate historical associations; the PR does not run a sync against their local app data.

Validation:

  • npm run check — passed, including new coverage for migration preservation/idempotence, GraphQL association retrieval, all four filtered query shapes, co-authors, repository/user/date filters, unknown data, and incremental refresh/backfill state.
  • npm run build — passed (existing bundle-size warning).
  • npm run typecheck — passed after final UI edits.

GitHub API semantics: https://docs.github.com/en/graphql/reference/commits

@adampeterhiggins
adampeterhiggins merged commit d9fdc53 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