getindiekit / indiekit

The little Node.js server with all the parts needed to publish content to your personal website and share it on social networks.
https://getindiekit.com
MIT License
338 stars 35 forks source link

Store: Add support for LFS (GitHub) repos #4

Open paulrobertlloyd opened 5 years ago

paulrobertlloyd commented 5 years ago

I’m currently using Sitewriter, which works with my website’s repo which uses LFS to store large files. Yet when I’ve used other tools, the necessary pointer files are not created, causing mischief in a repo. Turns out Sitewriter is using octokit.rb. Digging into the code for that and the JS library, I see references to LFS. Which makes me think, I’ll probably need to use the official library to interface with GitHub, rather than via the REST API.

paulrobertlloyd commented 5 years ago

Even if this doesn’t allow LFS support, it’s a neater implementation. It’s also pluggable, so that might come in handy when figuring out LFS issues.

paulrobertlloyd commented 5 years ago

Hmm, so a couple of things. Firstly, I imagined Sitewriter uploads supporting LFS… turns out all my most recent images were manually added. Secondly, neither Ruby or Node flavours of Octokit include support for LFS (only source migrations). It would seem that to upload to an LFS enabled repo requires interfacing with a separate git-lfs API. 😔

paulrobertlloyd commented 5 years ago

No idea if this package might come in handy.

paulrobertlloyd commented 1 year ago

For reference, a Git LFS pointer file looks something like this:

version https://git-lfs.github.com/spec/v1
oid sha256:733c51c9ee6f0f395f5f042869307154d6ebf6d5d5e3bc10e2af68a432903bf0
size 5104