diff --git a/dist/index.js b/dist/index.js index 6fb2b73..a669b16 100644 --- a/dist/index.js +++ b/dist/index.js @@ -25830,7 +25830,7 @@ async function main(sourceRepo, targetRepo, dryRun, tokenForTargetRepo) { // compared), albeit approximately-halved - but I'm gambling on the fact that that should still take // negligible practical time at usual repo sizes - at least, the ones I'm // this quadratic portion should be negligible, though - and, even if it isn't, it definitely will - targetCommitHistory = buildTargetCommitHistory(TARGET_DIR, sourceCommit.date).reverse(); + targetCommitHistory = buildTargetCommitHistory(TARGET_DIR, sourceCommit.date); } } console.log(`DEBUG - targetCommit: ${targetCommit.hash}`); @@ -25874,7 +25874,7 @@ function buildTargetCommitHistory(path, oldestDateInSourceCommitHistory) { try { const countingLogOutput = (0, child_process_1.execSync)(`git log --since=${oldestDateInSourceCommitHistory.toISOString()} --pretty=oneline`, { cwd: path }); const countedNumber = countingLogOutput.toString().split('\n').length; - console.log(`DEBUG - countedNumber: ${countedNumber}`); + console.log(`DEBUG - countedNumber (how many commits in target repo since oldest source commit) is: ${countedNumber}`); const logOutput = (0, child_process_1.execSync)(`git log --max-count=${countedNumber + 1} --pretty=format:'{\"hash\":\"%h\",\"author_name\":\"%an\",\"author_email\":\"%ae\",\"date\":\"%ai\",\"message\":\"%s\",\"parentHashes\":\"%p\"}'`, { cwd: path }); const logLines = logOutput.toString().split('\n'); for (const line of logLines) { diff --git a/node_modules/@vercel/ncc/dist/ncc/cli.js.cache b/node_modules/@vercel/ncc/dist/ncc/cli.js.cache index 115f864..09458ad 100644 Binary files a/node_modules/@vercel/ncc/dist/ncc/cli.js.cache and b/node_modules/@vercel/ncc/dist/ncc/cli.js.cache differ diff --git a/node_modules/@vercel/ncc/dist/ncc/index.js.cache b/node_modules/@vercel/ncc/dist/ncc/index.js.cache index 72b7ca9..cd987c3 100644 Binary files a/node_modules/@vercel/ncc/dist/ncc/index.js.cache and b/node_modules/@vercel/ncc/dist/ncc/index.js.cache differ diff --git a/node_modules/@vercel/ncc/dist/ncc/loaders/relocate-loader.js.cache b/node_modules/@vercel/ncc/dist/ncc/loaders/relocate-loader.js.cache index cf99cc1..1341417 100644 Binary files a/node_modules/@vercel/ncc/dist/ncc/loaders/relocate-loader.js.cache and b/node_modules/@vercel/ncc/dist/ncc/loaders/relocate-loader.js.cache differ diff --git a/node_modules/@vercel/ncc/dist/ncc/loaders/shebang-loader.js.cache b/node_modules/@vercel/ncc/dist/ncc/loaders/shebang-loader.js.cache index 81ca004..30b5349 100644 Binary files a/node_modules/@vercel/ncc/dist/ncc/loaders/shebang-loader.js.cache and b/node_modules/@vercel/ncc/dist/ncc/loaders/shebang-loader.js.cache differ diff --git a/node_modules/@vercel/ncc/dist/ncc/loaders/ts-loader.js.cache b/node_modules/@vercel/ncc/dist/ncc/loaders/ts-loader.js.cache index f17bb2f..b1bcb68 100644 Binary files a/node_modules/@vercel/ncc/dist/ncc/loaders/ts-loader.js.cache and b/node_modules/@vercel/ncc/dist/ncc/loaders/ts-loader.js.cache differ diff --git a/run.sh b/run.sh index a2cf3f9..477a5c9 100755 --- a/run.sh +++ b/run.sh @@ -6,11 +6,17 @@ # would be my natural preference rm -rf working +if [[ -z "$TOKEN" ]]; then + echo "TOKEN is not set" + exit 1 +fi + INPUT_SOURCE_REPO_DOMAIN="gitea.scubbo.org" \ INPUT_SOURCE_REPO_OWNER="scubbo" \ INPUT_SOURCE_REPO_NAME="commit-report-sync" \ - INPUT_TARGET_REPO_DOMAIN="gitea.scubbo.org" \ + INPUT_TARGET_REPO_DOMAIN="github.com" \ INPUT_TARGET_REPO_OWNER="scubbo" \ - INPUT_TARGET_REPO_NAME="commit-report-sync-testbed-destination" \ + INPUT_TARGET_REPO_NAME="gitea-commit-mirror" \ INPUT_DRY_RUN="false" \ + INPUT_TOKEN_FOR_TARGET_REPO="$TOKEN" \ npx ts-node src/index.ts \ No newline at end of file diff --git a/src/main.ts b/src/main.ts index 85dc624..e153681 100644 --- a/src/main.ts +++ b/src/main.ts @@ -103,7 +103,7 @@ export async function main(sourceRepo: Repo, targetRepo: Repo, dryRun: boolean, // compared), albeit approximately-halved - but I'm gambling on the fact that that should still take // negligible practical time at usual repo sizes - at least, the ones I'm // this quadratic portion should be negligible, though - and, even if it isn't, it definitely will - targetCommitHistory = buildTargetCommitHistory(TARGET_DIR, sourceCommit.date).reverse(); + targetCommitHistory = buildTargetCommitHistory(TARGET_DIR, sourceCommit.date); } } console.log(`DEBUG - targetCommit: ${targetCommit.hash}`); @@ -158,7 +158,7 @@ export function buildTargetCommitHistory(path: string, oldestDateInSourceCommitH { cwd: path } ); const countedNumber = countingLogOutput.toString().split('\n').length; - console.log(`DEBUG - countedNumber: ${countedNumber}`); + console.log(`DEBUG - countedNumber (how many commits in target repo since oldest source commit) is: ${countedNumber}`); const logOutput = execSync( `git log --max-count=${countedNumber+1} --pretty=format:'{\"hash\":\"%h\",\"author_name\":\"%an\",\"author_email\":\"%ae\",\"date\":\"%ai\",\"message\":\"%s\",\"parentHashes\":\"%p\"}'`, { cwd: path }