Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"bcryptjs": "^3.0.3",
"better-sqlite3": "^12.10.0",
"fastify": "^5.8.5",
"gitsheets": "^1.2.0",
"gitsheets": "^1.3.1",
"jose": "^6.2.3",
"samlify": "^2.13.0",
"uuidv7": "^1.2.1",
Expand Down
11 changes: 2 additions & 9 deletions apps/api/scripts/import-laddr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* --source-host=codeforphilly.org \
* --data-repo=/path/to/codeforphilly-data \
* --branch=legacy-import \
* [--dry-run] [--no-commit] [--limit=N] [--verbose] [--page-size=N] [--delay-ms=N]
* [--dry-run] [--limit=N] [--verbose] [--page-size=N] [--delay-ms=N]
*
* Defaults:
* --source-host codeforphilly.org
Expand All @@ -30,7 +30,6 @@ interface CliArgs {
readonly dataRepo: string;
readonly branch: string;
readonly dryRun: boolean;
readonly noCommit: boolean;
readonly limit: number | undefined;
readonly verbose: boolean;
readonly pageSize: number | undefined;
Expand Down Expand Up @@ -76,7 +75,6 @@ function parseArgs(argv: readonly string[]): CliArgs {
? (opts['branch'] as string)
: 'legacy-import',
dryRun: opts['dry-run'] === true,
noCommit: opts['no-commit'] === true,
limit: typeof limit === 'number' && Number.isFinite(limit) ? limit : undefined,
verbose: opts['verbose'] === true,
pageSize: typeof pageSize === 'number' && Number.isFinite(pageSize) ? pageSize : undefined,
Expand All @@ -90,16 +88,13 @@ async function main(): Promise<void> {
console.log(`[import-laddr] source-host=${args.sourceHost}`);
console.log(`[import-laddr] data-repo=${args.dataRepo}`);
console.log(`[import-laddr] branch=${args.branch}`);
console.log(
`[import-laddr] dry-run=${args.dryRun} no-commit=${args.noCommit} limit=${args.limit ?? 'none'}`,
);
console.log(`[import-laddr] dry-run=${args.dryRun} limit=${args.limit ?? 'none'}`);

const report = await importLaddrFromJson({
sourceHost: args.sourceHost,
dataRepo: args.dataRepo,
branch: args.branch,
dryRun: args.dryRun,
noCommit: args.noCommit,
limit: args.limit,
verbose: args.verbose,
pageSize: args.pageSize,
Expand Down Expand Up @@ -127,8 +122,6 @@ function printReport(report: ImportReport, args: CliArgs): void {
}
if (args.dryRun) {
lines.push(`(dry-run: no writes performed)`);
} else if (args.noCommit) {
lines.push(`(no-commit: files staged, no commit made)`);
} else if (report.noChanges) {
lines.push(`(no changes from parent commit — branch unchanged)`);
} else if (report.commitHash) {
Expand Down
Loading