@oss-autopilot/core 3.22.3 → 3.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1375,6 +1375,38 @@ export const commands = [
1375
1375
  console.log(` Warning: ${data.gistSyncWarning}`);
1376
1376
  });
1377
1377
  });
1378
+ group
1379
+ .command('push-prep')
1380
+ .description('Push the prepared branches of the latest run to prep/* on your fork (#1698). Post-tick step for a scheduler; the model never runs it')
1381
+ .option('--dry-run', 'Resolve targets and print the plan without pushing')
1382
+ .option('--json', 'Output as JSON')
1383
+ .action(async (options) => {
1384
+ const { OvernightPushPrepOutputSchema } = await import('./formatters/json.js');
1385
+ await executeAction(options, async () => {
1386
+ const data = await (await import('./commands/overnight-push-prep.js')).runOvernightPushPrep({
1387
+ dryRun: Boolean(options.dryRun),
1388
+ });
1389
+ // Unattended: a scheduler only sees the exit code. The output
1390
+ // (JSON or text) still prints in full.
1391
+ if (data.failed > 0)
1392
+ process.exitCode = 1;
1393
+ return data;
1394
+ }, (data) => {
1395
+ console.log(`${data.dryRun ? 'Plan' : 'Pushed'} as @${data.login}: ${data.pushed} pushed, ${data.planned} planned, ${data.skipped} skipped, ${data.failed} failed`);
1396
+ for (const r of data.results) {
1397
+ const where = r.ref ? ` -> ${r.remote} ${r.ref}` : '';
1398
+ console.log(` [${r.status}] ${r.url} (${r.branch})${where}${r.reason ? `: ${r.reason}` : ''}`);
1399
+ if (r.compareUrl)
1400
+ console.log(` compare: ${r.compareUrl}`);
1401
+ }
1402
+ if (data.reportRecreated)
1403
+ console.log(' Warning: the report was missing and has been recreated');
1404
+ if (data.reportWarning)
1405
+ console.log(` Warning: ${data.reportWarning}`);
1406
+ if (data.gistSyncWarning)
1407
+ console.log(` Warning: ${data.gistSyncWarning}`);
1408
+ }, OvernightPushPrepOutputSchema);
1409
+ });
1378
1410
  group
1379
1411
  .command('schedule')
1380
1412
  .description('Render (or with --install, write) the launchd plist that runs /oss-overnight nightly')