You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the GitHub apps need to access non-json type endpoint such as getting diff of PullRequest, need to set application/vnd.github.machine-man-preview.diff
as documented in https://developer.github.com/v3/media/#diff. (application/vnd.github.VERSION.diff)
For example, GitHub apps API need preview accept header
application/vnd.github.machine-man-preview+json
https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/
If the GitHub apps need to access non-json type endpoint such as getting diff of PullRequest, need to set
application/vnd.github.machine-man-preview.diff
as documented in https://developer.github.com/v3/media/#diff. (application/vnd.github.VERSION.diff)
However, go-github always set application/vnd.github.v3.diff for PullRequests.GetRaw request, so the request to GitHub will fail with
403 Resource not accessible by integration
error.I confirmed it works if i useapplication/vnd.github.machine-man-preview.diff
accept header.Note that it doesn't work only for private repository and as for public repo, it works with application/vnd.github.v3.diff header.
The text was updated successfully, but these errors were encountered: