List Pull Request Files API - when is patch undefined?


I’m using the API for listing pull request files described here:

The response for some files sometimes contains no ‘patch’ property. I’ve seen this when the change is only a file rename, when the diff is “too big”, i.e. does not render by default on the GitHub UI, and when an empty file has been added. I’m still not sure what the cutoff is for “too big”, or if there are other circumstances when this happens. Would it be possible to document this?

1 Like

You can find the documentation for most forms of “too big” in our help documentation. If you mean that you want all possible ways that patch can be undefined, I’ll pass along the feedback. I can’t promise anything or give an ETA, but the right people will get the message.

Let us know if you have more questions.

1 Like

Thank you! Yes, I do mean that I would like documentation on all ways that ‘patch’ can be undefined. The doc you sent is still very helpful, it would be nice if this was also referenced from the API documentation.

1 Like