Is it possible to get PR diff as a GitHub App?

Hello,
When I use OAuth Apps, I can get a git diff of PRs, using application/vnd.github.3.diff accept header, but when I use GitHub App, it says “Resource not accessible by integration”. Is there a way to get this diff?

Thanks!

Hey there @korolvs :wave:

I’m fairly confident the solution here is simple to the marked solution in this post:

Though I’ve seen other users also move away from the .diff in favor of the .patch endpoint which will return your diff.

Curious to know how you go!

If you still have trouble, I’d be curious to know what scope is applied to the key you’re using for the app. The key may simply not have the proper permissions but I bet the solution above from that other thread will get you what you need.

Hey,

It does work for OAuth Apps but doesn’t work for GitHub Apps.

Thanks @korolvs :bow:

Let me see what I can find out about Apps v OAuth and why that Resource not accessible by integration message is coming through.

I’ll do my best to do some research on this and get back with you.

1 Like

Hey again @korolvs !

So after poking around, there are a number of things that could potentially be happening. To that end, I have a few questions, if you don’t mind?

  1. Is your App publicly available? If so, could you link it?
  2. Is the PR you’re trying to query against also public? If so, link?
  3. How are you authenticating your app? (as a GitHub App / as an installation)