When I want to test a specific unpublished Asterisk version, I use its PR id (here #815) in a command like this wget -O asterisk-pr-815.tar.gz https://api.github.com/repos/asterisk/asterisk/tarball/pull/815/head
With resulting asterisk-pr-815.tar.gz, I can use usual process to compile and build Asterisk.
Is it possible to get several PRs is a single tar.gz ?
There are other ways to do this, but one option is to write a script that takes PR IDs as arguments and loops through them, downloading the diffs and applying them to your install of Asterisk. You can abort on error and revert the changes or do whatever cleanup you want to do at that point. If you use gh, there may be some tools built into it that can do what you want.
Before you replied, I came to the same conclusion as you: I just have to loop over the PR I’m interested in, and apply each on a source directory.
The problem I had was, though I found a way to get a diff file for a given Github PR, I couldn’t apply it within the source directory for a reason I didn’t investigate.
The command I used to apply the patch was: patch --dry-run <path/to/patch.file
As this command took more than 5 minutes with no visible result, I aborted it before its end.