shields icon indicating copy to clipboard operation
shields copied to clipboard

Badge Request: Total commits of GitHub user

Open dodaucy opened this issue 7 months ago • 1 comments

📋 Description

New badge for GitHub:

  • It should display the amount of total commits of the 200 most starred repos of the given user / org.
  • Required parameter: a GitHub user or org
  • Optional parameter: affiliations (OWNER,COLLABORATOR,ORGANIZATION_MEMBER)
  • Similar to the GitHub User's stars badge

🔗 Data

Maybe REST API endpoints for commits can be used to count the commits of a repo.

🎤 Motivation

It could be used in profile README files to display stats of a user.

dodaucy avatar Jun 04 '25 21:06 dodaucy

I think this request could appear like it has some artificial boundaries, so I wanted to add that some elements (like the seemingly magic 200 number) are ostensibly being mentioned here because those were set previously for another GitHub badge (refs #5507) and so would likely be reasonable limits to include here as well

I suspect that using the v3 rest api would probably be suboptimal here as that would require quite a large number of requests to be issued in total, and several strings of those calls would have to be sequenced together (e.g. get all repos, get stars for each repo, get commits for top 200 most starred repos).

I'd instead suggest reviewing GitHub's v4 api (graph based) and determining whether the necessary data could be retrieved with a single query, or at least significantly fewer queries than would be required with v3/rest

calebcartwright avatar Jun 11 '25 20:06 calebcartwright