Getting several Github PR is a single tar.gz

Hello,

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 ?

Bets regards

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.

Thank you very much for replying.

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.

I got the patch for PR905 using the URL:
https://patch-diff.githubusercontent.com/raw/asterisk/asterisk/pull/905.patch

I’ll take a close look at gh binary and see I can get a bit further.