kaizensoze / node-github

[DEPRECATED] Node.js wrapper for GitHub API
https://kaizensoze.github.io/node-github/
MIT License
29 stars 5 forks source link

Is there any command to get sha blob of a file? #111

Closed vydingding closed 8 years ago

vydingding commented 8 years ago

I want to update a file but I need to constantly change it's SHA in my node js code. Is there any command to get sha blob through .getSha or something?

kaizensoze commented 8 years ago

Would getBlob help?

https://kaizensoze.github.io/node-github/#api-gitdata-getBlob

vydingding commented 8 years ago

But it still requires a previous sha. And I know getContent gives the sha, but it doesn't give it separately; it gives out ALL the contents of the file including the sha.

kaizensoze commented 8 years ago

Right. I don't know of a getSha, but you can double check the github api doc: https://developer.github.com/v3/.