all-time contributed-to, contribs to own repos - #528
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
marcalexiei
reviewed
Aug 27, 2026
marcalexiei
left a comment
There was a problem hiding this comment.
I've made several adjustments/ improvements via #529
- Refinements for #528 --- - New `common/date.ts`, exposes - `getGitHubYearRange` - `toGitHubDateTime` - `dateDiff` (moved from `ops.ts`); the three places that built a year's UTC bounds now share it. - `?commits_year` must be a four-digit year, rejected at the api boundary as `error - permanent` instead of `NaN` or a temporary error later. - All-time contributed-to fetcher: filters own repos by `user.login`, selects `repositoryContributions` only when own repos are requested (saves nodes), and caps each request at `MAX_RANGES_PER_REQUEST` aliases. - Simplified that fetcher into one function with a shared `graphqlError` helper; own repos are skipped while collecting and the no-op `roundToNearestMidnight` is gone. - `fetchStats.test.ts`: fixtures are typed against the generated query types, and `fetchStatsWith` / `expectedStats` helpers replace the positional calls and repeated expectation blocks. --------- Co-authored-by: martin-mfg <2026226+martin-mfg@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
all_time_contribsstat that shows the number of repositories a user has contributed to across all years — not just the past year like the defaultcontribsstat.contribs_include_own_reposto include the user's own repositories in thecontribsandall_time_contribsstats. By default, both stats exclude them and only count repositories owned by other users or organizations.