TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: How to Do a GitHub Wrapped?

5 点作者 cborenstein超过 1 年前
Hi HN, I&#x27;d like to do a quick &quot;GitHub Wrapped&quot;, similar to Spotify Wrapped, where I can see how many lines of code I added &#x2F; deleted from a repo this year.<p>Has anyone done this? Looking for an easy way to compute it.

2 条评论

jstrieb超过 1 年前
I have done similar work using the GitHub APIs before. I recommend using their GraphQL explorer to develop your queries interactively. You may need to fall back on the REST API instead of the GraphQL one for certain stats.<p><a href="https:&#x2F;&#x2F;docs.github.com&#x2F;en&#x2F;graphql&#x2F;overview&#x2F;explorer" rel="nofollow noreferrer">https:&#x2F;&#x2F;docs.github.com&#x2F;en&#x2F;graphql&#x2F;overview&#x2F;explorer</a><p>You can also refer to my code here, which may already collect some of the statistics you&#x27;re interested in.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;jstrieb&#x2F;github-stats&#x2F;blob&#x2F;master&#x2F;github_stats.py">https:&#x2F;&#x2F;github.com&#x2F;jstrieb&#x2F;github-stats&#x2F;blob&#x2F;master&#x2F;github_s...</a><p>I predict the most annoying part of this project will be dealing with authentication. There are a handful of ways to do it, and the permissions can be finicky depending on what data you are fetching.<p>Best of luck!
评论 #38703258 未加载
isurujn超过 1 年前
<a href="https:&#x2F;&#x2F;githubunwrapped.com" rel="nofollow noreferrer">https:&#x2F;&#x2F;githubunwrapped.com</a>