Arun Chandramouli
Arun Chandramouli

Reputation: 87

Pygithub - Organization Repo - Access Pull Requests Details

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.

Upvotes: 2

Views: 3525

Answers (1)

Javier PR
Javier PR

Reputation: 645

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)

Upvotes: 3

Related Questions