I am trying to get total number of Commits for each repository for repositories using Python GitHub.
Code:
from github import Github
git = Github("token")
org = git.get_organization('organization')
for repo in org.get_repos():
repository_commit_date = repo.get_commit(sha='master')
stats_ = repository_commit_date.stats
print(stats_.total)
The code returns something else and it doesn't match the actual number of commits for the repositories. Can someone help me with this?
I want the output to look like:
Output:
Repository Name: hello-world
Number of commits: 62