A faster option might be to use the Github API to list all public repositories of an organization. For each repository only clone the commits using git clone --filter=object:type=commit
. Then use git to examine the commits.
Here's some pseudo code to explain how to count every commit in an organization.
num_commits = 0for repo in org.repos git clone --filter=object:type=commit repo.url cd into repo num_commits += git rev-list --all --count
This has the potential to be very efficient because the commit objects are very small and cloning is very efficient. Much more efficient than paging through every commit with a JSON API.