From 41fd5fd33cca629863b6faee647eb8a3c3ec8bde Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Sat, 14 Jan 2023 06:01:19 +0100 Subject: [PATCH] feat: GitLab LFS Support (#346) --- packages/core/src/backends/gitlab/API.ts | 2 +- packages/docs/content/docs/gitlab-backend.mdx | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/core/src/backends/gitlab/API.ts b/packages/core/src/backends/gitlab/API.ts index c8c2983e..d3d98701 100644 --- a/packages/core/src/backends/gitlab/API.ts +++ b/packages/core/src/backends/gitlab/API.ts @@ -221,7 +221,7 @@ export default class API { const fetchContent = async () => { const content = await this.request({ url: `${this.repoURL}/repository/files/${encodeURIComponent(path)}/raw`, - params: { ref: branch }, + params: { ref: branch, lfs: 'true' }, // lfs=true means that even if the file is stored in LFS, return the content cache: 'no-store', }).then(parseText ? this.responseToText : this.responseToBlob); return content; diff --git a/packages/docs/content/docs/gitlab-backend.mdx b/packages/docs/content/docs/gitlab-backend.mdx index fde3e911..ef2e69dd 100644 --- a/packages/docs/content/docs/gitlab-backend.mdx +++ b/packages/docs/content/docs/gitlab-backend.mdx @@ -79,3 +79,7 @@ backend: { }, ``` + +## Git Large File Storage (LFS) + +The GitLab backend **does** support [git-lfs](https://git-lfs.github.com/).