Skip to content

all-time contributed-to, contribs to own repos refinements - #529

Open
marcalexiei wants to merge 3 commits into
stats-organization:contributed-tofrom
marcalexiei:contributed-to
Open

all-time contributed-to, contribs to own repos refinements#529
marcalexiei wants to merge 3 commits into
stats-organization:contributed-tofrom
marcalexiei:contributed-to

Conversation

@marcalexiei

Copy link
Copy Markdown

  • 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.

@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

@marcalexiei is attempting to deploy a commit to the martin-mfg's projects Team on Vercel.

A member of the Team first needs to authorize it.

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