2

I am using Pygithub for a public repo , I am new to it, how do I access my organization repo(private) Pull Request details , given that , from my settings i had generated OAuth Tokens and Private Tokens.

1 Answers1

3

You need to authenticate with your token first:

from github import Github
git = Github('TOKEN')

Then you need to get the repo from your organisation:

repo = git.get_organization(org_name).get_repo(repo_name)

And finally, you can get the pull request by number:

pull = repo.get_pull(pull_request_number)
ViG
  • 1,848
  • 1
  • 11
  • 13
Javier PR
  • 615
  • 6
  • 13