Skip to content

feat: use GitHub star history API for trends - #1105

Open
pastelsky wants to merge 10 commits into
bundlephobiafrom
codex/trends-data-sources-github-api-v3
Open

feat: use GitHub star history API for trends#1105
pastelsky wants to merge 10 commits into
bundlephobiafrom
codex/trends-data-sources-github-api-v3

Conversation

@pastelsky

@pastelsky pastelsky commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • add the trends data-source and cache-service foundation on the current bundlephobia branch
  • use GitHub's official privacy-safe /stargazers/history endpoint for exact daily star actions
  • keep current stargazers_count as a separate live snapshot
  • remove issue history and current issue counts from the trends contract for now
  • remove the ClickHouse and OSS Insight GitHub-history fallbacks so the source contract is explicit
  • paginate only as far back as the requested range, validate weekly totals, and expose source/completeness metadata

Data contract

The historical stars series is star actions, not cumulative star stock. Issue history and issue snapshots are intentionally absent from this feature until a reliable historical source is available.

This supersedes the older cache protocol in #1089; do not merge both implementations. It is the backend/data-source PR to review before wiring the page in #1076.

Validation

  • yarn format:check
  • yarn typecheck
  • yarn lint (existing warnings only)
  • focused trends tests: 11 passed
  • yarn build
  • full Jest: 136 passed; 5 existing errors-cache fixture failures remain in the local environment

The GitHub endpoint documentation is at https://docs.github.com/en/rest/activity/starring?apiVersion=2026-03-10.

@pastelsky
pastelsky force-pushed the codex/trends-data-sources-github-api-v3 branch from 165d766 to 24a4eb8 Compare September 5, 2026 07:16
}
}

export function parseGithubRepository(

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

I thought we had an npm dep for this?

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