Access pull request patch as installation


#1

Hey,

GitHub provides the patch of a pull request under URLs of the form https://github.com/OWNER/REPO/pull/PR_ID.patch (https://github.com/blog/967-github-secrets)

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
#2

Found the solution.

One needs to use the api endpoint with a special media type: https://developer.github.com/changes/2012-12-10-Diff-and-patch-media-types/