Commits count not coming
Closed this issue · 1 comments
ukreddy-erwin commented
With the curl command:
curl -I --user "username:password" https://api.github.com/repos///commits?per_page=1
will give a json output where at the "List=" section we will get number of commits in the repo for master branch.For other branch, we will add &sha='branch' at the end.
How to frame this in your python code?
michaelliao commented
https://docs.github.com/en/rest/commits/commits?apiVersion=2022-11-28#list-commits
>>> gh.repos('michaelliao')('githubpy').commits.get(sha='master', per_page=10)
[{'sha': '232203c9eda4fd1f3905bc2e45df5c7a802ba2df', 'node_id': ...