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
On line 62 of index.js, patch attribute remains undefined for large patch sizes.
This is due to Octokit's behavior wherein it does not provide patch attribute for large patch sizes (Please refer to this issue in octokit.net).
We can use the contents_url attribute to get the file path and the ref. We can then use repos.getContent with the accept-headers set to diff.
There are a few problems with this approach though. The content is encoded in Base64 by default. So that must be decoded back to raw or text, which is more suitable. Secondly, I am not too sure if, even after specifying the header, we get just the diff or the complete content.
It would be great if you could suggest any other alternative approach.
Thanks!
The text was updated successfully, but these errors were encountered:
On line 62 of index.js,
patch
attribute remains undefined for large patch sizes.This is due to Octokit's behavior wherein it does not provide
patch
attribute for large patch sizes (Please refer to this issue in octokit.net).We can use the
contents_url
attribute to get the file path and the ref. We can then userepos.getContent
with theaccept-headers
set to diff.There are a few problems with this approach though. The content is encoded in Base64 by default. So that must be decoded back to raw or text, which is more suitable. Secondly, I am not too sure if, even after specifying the header, we get just the diff or the complete content.
It would be great if you could suggest any other alternative approach.
Thanks!
The text was updated successfully, but these errors were encountered: