pre-commit-ci / issues

public issues for https://pre-commit.ci
16 stars 3 forks source link

LFS support #76

Open maximveksler opened 3 years ago

maximveksler commented 3 years ago

Hey,

We're having some pretty large json files (for us the use case is graphana dashboards) that we prefer to store in the repo, as LFS links.

Using pre-commit as a GitHub action it worked well for us to configure the lfs: true on the checkout action.

    # Whether to download Git-LFS files
    # Default: false
    lfs: ''

However with pre-commit.ci it seems that no support for LFS based checkouts is offered. This in turn cause our builds to fail with

infrastructure/ansible/roles/shlomo/monitoring/files/grafana-shlomo-dashboard.json: Failed to json decode (Expecting value: line 1 column 1 (char 0))

image

asottile commented 3 years ago

checkout is easy but push may make this hard: I don't see a way to grant bot permissions to lfs push and I don't see a way to lfs commit using the api. I'm also not sure how lfs works for forks 🤔

how large are the json files? I've never seen lfs used for text files (since it doesn't provide all that much benefit there w/ blob compression)