Accessing private fork for pull request analysis



we’re building an integration that relies on cloning repositories to perform analysis. Our app therefore requests access to code.

Now say there is account A with private repo foo (A/foo). If somebody forks it to B/foo and creates a pull request on A/foo then - since our installation is only installed on A - we can not clone B/foo to run our analysis and provide insights for this pull request as B/foo is a private repo.

Is this correct? I guess the only workaround would be to use the API to access the code for the specific pull request?


Can’t you just take the patch ( and apply it on the base in your repository and do the analysis? A pull request is nothing else than a diff patch from one branch to another. Doesn’t matter if the two branches life in the same repository.


Thanks. I was not aware of the .*patch URLs


Unfortunately I can not access these URLs for private repositories. Created a follow up here:
Access pull request patch as installation