To automate GitHub tasks you need to be able to access GitHub. Instead of logging in using a user name and password, you can use an API key or personal access token. Such a token should not be shared, and you need to keep it secret at all times.
So, this recipe begins with generating an access token and shows you a simple Python script. The Python script will find all your repositories, and find all the pull requests for each repository.