refactor: consolidate upload helpers

This commit is contained in:
Tom Boullay
2026-04-27 17:20:54 +02:00
parent 43cf48cc7d
commit d049318a73
11 changed files with 38 additions and 38 deletions
+3 -3
View File
@@ -1,7 +1,7 @@
import { createHash } from 'crypto'
import { Octokit } from '@octokit/rest'
import { LFS_EXTENSIONS } from './constants'
import type { RemoteFile } from './types'
import type { PushFile, RemoteFile } from './types'
// ---------------------------------------------------------------------------
// Octokit helpers
@@ -237,7 +237,7 @@ export async function getRemoteFolder(
// ---------------------------------------------------------------------------
export async function pushAllToGitHub(
files: { path: string; contentBase64: string }[],
files: PushFile[],
deletePaths: string[],
commitMessage: string,
): Promise<{ commitUrl: string }> {
@@ -247,7 +247,7 @@ export async function pushAllToGitHub(
// --- Separate LFS files from regular files ---
const lfsFiles: { path: string; contentBase64: string; oid: string; size: number }[] = []
const regularFiles: { path: string; contentBase64: string }[] = []
const regularFiles: PushFile[] = []
for (const f of files) {
if (isLfsFile(f.path)) {