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

fix: access diff directly to enable support to private repositories #14

Merged
merged 2 commits into from
Jul 31, 2023

Conversation

lfsevergnini
Copy link
Contributor

@lfsevergnini lfsevergnini commented Jul 12, 2023

What's new

When comparing commits, add the "Accept: application/vnd.github.v3.diff" header so that Github's API returns the raw diff instead.

That allows Oktokit to get the raw diff even for private repositories, which is not possible accessing the regular diff_url.

Further info: https://stackoverflow.com/questions/40393117/getting-file-diff-with-github-api

This solves the problem found in #12.

@villesau
Copy link
Contributor

Very good catch! I noticed the same issue with our private repos but didn't manage fix that yet. Thanks for this @lfsevergnini !

@villesau villesau merged commit 0939fc4 into freeedcom:main Jul 31, 2023
1 check passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants