@oss-autopilot/core 3.22.3 → 3.24.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.
@@ -56,7 +56,7 @@ export function handleCommandError(err, json) {
56
56
  * the goldens were last updated.
57
57
  * Commands: state (show/sync/unlink), vet, vet-list, track, comments,
58
58
  * startup, dismiss, undismiss, stats, and the five
59
- * guidelines subcommands (list/view/store/reset/fetch-corpus).
59
+ * guidelines subcommands (list/view/store/reset/fetch-corpus/mark-extracted).
60
60
  *
61
61
  * (`dashboard serve` is exempt: it has no `--json` mode.)
62
62
  *
@@ -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')
@@ -1504,6 +1536,16 @@ Load it with:
1504
1536
  console.log(`Stored ${data.byteSize} bytes of guidelines for ${data.repo}.`);
1505
1537
  });
1506
1538
  });
1539
+ group
1540
+ .command('mark-extracted')
1541
+ .description('Stamp learningsExtractedAt on fetched PRs of a repo so daily stops reporting them as unextracted (#1696)')
1542
+ .requiredOption('--repo <owner/repo>', 'Repository identifier')
1543
+ .option('--json', 'Output as JSON')
1544
+ .action(async (options) => {
1545
+ await executeAction(options, async () => (await import('./commands/guidelines.js')).runMarkExtracted({ repo: options.repo }), (data) => {
1546
+ console.log(`Marked ${data.marked} PR(s) in ${data.repo} as extracted.`);
1547
+ });
1548
+ });
1507
1549
  group
1508
1550
  .command('reset')
1509
1551
  .description('Tombstone the guidelines file for a repo (subsequent reads return null)')