Access pull request patch as installation



GitHub provides the patch of a pull request under URLs of the form (

I’d like to access these patches by authenticating as installation. However, it does not work (getting 404 for private repositories). In particular I had no luck using ‘token TOKEN’ as Authorization header in the GET request.

Is this endpoint supposed to work for installations? If not, any chance this will be enabled in the near future?

Accessing private fork for pull request analysis

Found the solution.

One needs to use the api endpoint with a special media type: