I suppose this is your next step:
https://docs.github.com/en/rest/reference/metrics#get-all-contributor-commit-activity
in pygithub: https://pygithub.readthedocs.io/en/latest/github_objects/Repository.html?highlight=get_stats_contributors#github.Repository.Repository.get_stats_contributors
get_stats_contributors method with this kinds of return:
hope this kinds of return val can help you:
[
{
"author": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"total": 135,
"weeks": [
{
or, there are some other method via git logs commandline, such as:
git log --pretty=format:"%an" --shortstat --no-merges --author=$1 \
| sed '/^$/d'\
| awk -F' ' '{s1+=$4;s2+=$6}END{printf "additions: %s; deletions: %s\n",s1,s2}'
hope these info can help you