refactor: consolidate upload helpers
This commit is contained in:
+3
-3
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user