Skip to content

Error on updating a file #1809

Answered by gr2m
ahmedk92 asked this question in Q&A
Jul 21, 2020 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

What you want is the file sha, not the commit sha. You can get the file sha using octokit.repos.getContents({owner, repo, path}). The response data includes sha, which is the sha you need to set when updating the file.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@gr2m
Comment options

@ahmedk92
Comment options

Answer selected by ahmedk92
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants