Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch attribute of file object remains undefined when patch size is large #8

Open
apb7 opened this issue Jun 29, 2018 · 0 comments
Open

Comments

@apb7
Copy link

apb7 commented Jun 29, 2018

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant