Python Forum
How to list repository contributors and their commits using pygithub3
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to list repository contributors and their commits using pygithub3
#1
I have a Github user in which I have been granted the access to see an organization called 'W-Org' with all its repositories. It has repo-A and repo-B.

If I click on W-Org and navigate to repo-A, then click on 'Graphs', I can see each contributor to this repo-A with his commits (no of commits, lines added, lines removed).

How can I write python code using pygithub3 to get into this? All what I could get is a list of repositories for this org using:


gr = gh.repos.list_by_org('W-Org',type='all').all() 
and a list of all contributors (not linked to each repo) using:

gh.orgs.members.list('W-Org').all()
How to link this repository with the contributor and then get his commits? 

I also tried this code, but it gives me 'Not found 404!' although I can see and click on repo-A and see its contents.


gh.repos.commits.list('repo-A').all()
Reply


Messages In This Thread
How to list repository contributors and their commits using pygithub3 - by ammarkhwaira - Feb-09-2017, 01:36 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020