Skip to content

feat(stars): Achieve sampling mode to obtain star historical data from a large database repository#248

Merged
caarlos0 merged 3 commits intocaarlos0:mainfrom
lik0914:main
Feb 5, 2026
Merged

feat(stars): Achieve sampling mode to obtain star historical data from a large database repository#248
caarlos0 merged 3 commits intocaarlos0:mainfrom
lik0914:main

Conversation

@lik0914
Copy link
Contributor

@lik0914 lik0914 commented Jan 7, 2026

  • Add GitHub Max sample pages configuration option
  • Implement Link header parsing to get the actual maximum number of pages
  • Add a sampling algorithm to evenly distribute the page fetching strategy
  • Support pagination sampling data fetching for large repositories
  • Optimize concurrent request limits and error handling mechanisms
  • Change the Y-axis data of the chart to use actual counts instead of index values

- 添加GitHub最大采样页数配置选项
- 实现Link header解析获取实际最大页数功能
- 添加采样算法均匀分布页面获取策略
- 支持大型仓库的分页采样数据获取
- 优化并发请求限制和错误处理机制
- 修改图表Y轴数据使用实际计数而非索引值
- 添加智能采样模式功能说明
@caarlos0
Copy link
Owner

caarlos0 commented Jan 7, 2026

thanks for the PR, but please translate things to english.

thanks.

@lik0914 lik0914 changed the title feat(stars): 实现采样模式获取大型仓库的star历史数据 feat(stars): Achieve sampling mode to obtain star historical data from a large database repository Jan 8, 2026
@xiongjiamu
Copy link

lgtm~~~

@caarlos0 caarlos0 mentioned this pull request Feb 4, 2026
@codecov
Copy link

codecov bot commented Feb 4, 2026

Codecov Report

❌ Patch coverage is 29.32331% with 94 lines in your changes missing coverage. Please review.
✅ Project coverage is 15.50%. Comparing base (31d8f93) to head (ee06663).
⚠️ Report is 26 commits behind head on main.

Files with missing lines Patch % Lines
internal/github/stars.go 28.00% 87 Missing and 3 partials ⚠️
controller/chart.go 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #248      +/-   ##
==========================================
- Coverage   18.58%   15.50%   -3.09%     
==========================================
  Files          29       29              
  Lines        1162     1090      -72     
==========================================
- Hits          216      169      -47     
+ Misses        920      898      -22     
+ Partials       26       23       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@caarlos0 caarlos0 merged commit 4d6ec3a into caarlos0:main Feb 5, 2026
3 of 5 checks passed
@caarlos0
Copy link
Owner

caarlos0 commented Feb 5, 2026

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants