I’m looking for a way to recover pull requests from a forked repository. Is it possible?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When one fork a repository, GitHub only forks the code, not the pull requests.
However, you can retrieve the pull requests from the upstream repository by leveraging the GitHub Pull Request API.
By default, only the PR which are currently opened are listed. You can access the closed ones by passing an optional state parameter.
Note: This will allow you to retrieve the metatdata of the pull requests of any repository (forked or not).
Alternative (by hand) way
This will retrieve every pull request (opened and closed) from the GitHub hosted repository and create a branch per pull request in you local repository.
Warning: this is an undocumented GitHub feature and might stop working without notice.