Skip to content

all-time contributed-to, contribs to own repos - #528

Merged
martin-mfg merged 10 commits into
masterfrom
contributed-to
Sep 1, 2026
Merged

all-time contributed-to, contribs to own repos#528
martin-mfg merged 10 commits into
masterfrom
contributed-to

Conversation

@martin-mfg

Copy link
Copy Markdown
Member
  • add all_time_contribs stat that shows the number of repositories a user has contributed to across all years — not just the past year like the default contribs stat.
  • add parameter contribs_include_own_repos to include the user's own repositories in the contribs and all_time_contribs stats. By default, both stats exclude them and only count repositories owned by other users or organizations.

@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
github-stats-extended-backend Ready Ready Preview Sep 1, 2026 9:00am UTC
1 Skipped Deployment
Project Deployment Actions Updated
github-stats-extended-frontend Ignored Ignored Sep 1, 2026 9:00am UTC

Request Review

@marcalexiei marcalexiei left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@martin-mfg
martin-mfg merged commit f42c416 into master Sep 1, 2026
16 of 17 checks passed
@martin-mfg
martin-mfg deleted the contributed-to branch September 1, 2026 09:14
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.

2 participants