k1LoW / tbls

tbls is a CI-Friendly tool for document a database, written in Go.
MIT License
3.32k stars 163 forks source link

Use `ghfs` for AnalyzeGithubContent #581

Closed kromiii closed 2 months ago

kromiii commented 2 months ago

Problem

Sometimes, fetching a schema file from GitHub fails because the file exceeds the file size limit in GitHub API.

https://docs.github.com/ja/rest/repos/contents?apiVersion=2022-11-28#get-contents

Failed to analyze schema: unsupported content encoding: none, this may occur when file size > 1 MB, if that is the case consider using DownloadContents

Solution

We can avoid this by using ghfs (https://github.com/k1LoW/ghfs). It uses Git Database API, which has no file size limit.

Concern

I would appriciate if you would judge whether we need to rewrite the entire code to accommodate some large files.

kromiii commented 2 months ago

GREAT! Thank you!!

One minor correction, please.

Thanks!