Hi HN, I'd like to do a quick "GitHub Wrapped", similar to Spotify Wrapped, where I can see how many lines of code I added / deleted from a repo this year.<p>Has anyone done this? Looking for an easy way to compute it.
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://docs.github.com/en/graphql/overview/explorer" rel="nofollow noreferrer">https://docs.github.com/en/graphql/overview/explorer</a><p>You can also refer to my code here, which may already collect some of the statistics you're interested in.<p><a href="https://github.com/jstrieb/github-stats/blob/master/github_stats.py">https://github.com/jstrieb/github-stats/blob/master/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!