PyGithub - How to get a list of all commits for a particular branch?

Viewed 1090

I need to check all commits made to a particular branch on github.

I am aware of

repo.get_commits() 

but this returns commits for all branches of that repository I guess. I haven't found any branch attribute neither in Commit class nor in Gitcommit class.

Also there is not sth like .get_commits() in Branch class

What is the proper way to solve this problem?

1 Answers
Related