function to fetch pull requests