Skip to content

Instantly share code, notes, and snippets.

@nhomar
Last active March 2, 2023 12:58
Show Gist options
  • Save nhomar/41a43cbb9c2505bab3f6 to your computer and use it in GitHub Desktop.
Save nhomar/41a43cbb9c2505bab3f6 to your computer and use it in GitHub Desktop.
Get the pull requests to a branch. With PyGithub
from github import Github
g = Github("user", "password")
repo = g.get_repo('organizacion/repo')
pulls = repo.get_pulls()
for p in pulls:
print p.merged
print p.base.sha
print p.id
print dir(p)
@nhomar
Copy link
Author

nhomar commented Jul 29, 2014

sudo pip install PyGithub

@shloka-bhalgat-unskript
Copy link

This is great! Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment