Skip to main content

lfs

Creates, updates, deletes, gets or lists a lfs resource.

Overview

Namelfs
TypeResource
Idgithub.migrations.lfs

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
ref_namestring
oidstring
pathstring
sizeinteger

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_large_filesselectowner, repoList files larger than 100MB found during the import

> [!WARNING]
> Endpoint closing down notice: Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the changelog.
set_lfs_preferenceupdateowner, repo, use_lfsYou can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability
is powered by Git LFS.

You can learn more about our LFS feature and working with large files on our help
site
.

> [!WARNING]
> Endpoint closing down notice: Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the changelog.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
ownerstringThe account owner of the repository. The name is not case sensitive.
repostringThe name of the repository without the .git extension. The name is not case sensitive.

SELECT examples

List files larger than 100MB found during the import

> [!WARNING]
> Endpoint closing down notice: Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the changelog.

SELECT
ref_name,
oid,
path,
size
FROM github.migrations.lfs
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
;

UPDATE examples

You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability
is powered by Git LFS.

You can learn more about our LFS feature and working with large files on our help
site
.

> [!WARNING]
> Endpoint closing down notice: Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the changelog.

UPDATE github.migrations.lfs
SET
use_lfs = '{{ use_lfs }}'
WHERE
owner = '{{ owner }}' --required
AND repo = '{{ repo }}' --required
AND use_lfs = '{{ use_lfs }}' --required
RETURNING
authors_count,
authors_url,
commit_count,
error_message,
failed_step,
has_large_files,
html_url,
import_percent,
large_files_count,
large_files_size,
message,
project_choices,
push_percent,
repository_url,
status,
status_text,
svc_root,
svn_root,
tfvc_project,
url,
use_lfs,
vcs,
vcs_url;