@theholocron/cli 5.0.0-alpha.487 โ†’ 5.0.0-alpha.488

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.
package/README.md CHANGED
@@ -661,7 +661,7 @@ commands and the config are provider-neutral; Discord is the first provider.
661
661
  | `holocron new server --name <n> --owner <id>` | Creates the server the layout describes, writes its id into the config, applies the layout, invites the owner, waits for them to join and hands the server over (`--resume` finishes an interrupted hand-over; `--force` allows a second server) |
662
662
  | `holocron link account` | Links your account on the provider to your GitHub account by signing in with the provider (OAuth, nothing secret kept) |
663
663
  | `holocron sync roles` | Makes who holds a role match a GitHub team, through the links file (`--keep` only adds; `--provider` picks one) |
664
- | `holocron reconcile project [board]` | Sets item statuses where a rule says so: an open blocker means `blocked`, no blocker left means `planned`, closed means `done` (status only; `--dry-run` previews; an open item with no status is reported). Runs hourly from `platform.projectReconcile.yml`, which `setup` writes when `providers.projects` declares boards |
664
+ | `holocron reconcile project [board]` | Sets item statuses where a rule says so: an open blocker means `blocked`, no blocker left means `planned`, closed means `done`, and (from the pull requests that close the item) an open pull request means `active` and a green `ci / Required checks` means `review` (status only; `--dry-run` previews; an open item with no status is reported). Runs hourly from `platform.projectReconcile.yml`, which `setup` writes when `providers.projects` declares boards |
665
665
  | `holocron doctor notifications [--built-only] [--deliver] [--post]` | Step by step: does the server match the layout, do the secrets exist, and does a person (not the bot) own it. A full run also leaves one `๐Ÿงช test:` post in the layout's `testChannel`; `--built-only` posts nothing; `--deliver` posts to every channel and removes each post; `--post [channel]` posts the result as the bot (the failures, or only the summary when none fail). It also reads the Checkly feed (webhook, alert channel, subscriptions), the Comlink relay (Worker, route, bindings, the tracker's integration and rule) and the Notifications workflow (the file, and the secrets it reads), posting nothing, so `--built-only` keeps those steps. The `bot-permissions` row compares what the bot's roles hold server-wide with the permissions it needs (`ServerInspection` `botPermissions`; the owner and Administrator hold all, channel overwrites are left to the forum row) and, when some are missing, fails naming them in plain words with the invite link that asks for them again (not a credential); it is skipped, with the reason, when the roles could not be read |
666
666
  | `holocron doctor ci` | Has the repo moved to the flat task vocabulary? One row each for the `tasks:` entries (a deprecated alias, with the id that replaces it), the generated callers (file, workflow and job name equal the task id), the `ci` aggregate's `expected` list (no id missing or stale) and where the callers point (`theholocron/.github` or holocron `ci-v1`). Read-only, no provider needed; exits 1 on a failure. The ruleset's checks are `doctor repo`'s |
667
667
  | `holocron doctor github-app` | Does each GitHub App instance in `githubApps` (`{ name, manifest, environment }`) have what its manifest file (`default_permissions`, `default_events`) declares? Reads the App's id and key from the vault `environment` in memory (never printed), calls `GET /app` and `GET /app/installations` with the App's JWT. Rows per instance: `reachable`, `events` (all subscribed), `permissions` (each granted at least at the manifest's level, `read < write < admin`), `installations` (none lags the App, a pending update fails). Extras on the App are `info` in a row's detail, never a failure. A gap ends with the App's settings page (user- or organization-owned) and, for an installation, its own page. Credentials that cannot be read are a skip; an unreadable manifest or a rejected JWT fails. Read-only |
@@ -852,6 +852,7 @@ holocron new tunnel --name sentinel-dev --hostname sentinel-dev.example.dev --po
852
852
  holocron list projects # the org's project boards (also: create [template], close <number-or-name>, setup)
853
853
  holocron migrate project v5 --from github --to github:repo=acme/new --dry-run # preview putting a board's issues on a board of the same name in the target (GitHub; --template picks the template a missing board is made from, default roadmap); a target without boards (Linear) gets a project of that name instead
854
854
  holocron migrate issues --all --from github --to linear:team=ENG --limit 20 --order newest --dry-run # a trial run: read only the 20 last-created issues (--order oldest, the default, reads the first created); prints `limited to 20 of M`, and a second run with the same limit selects the same issues (`migrate issues` and `migrate project`, and `sync issues`; not `migrate issue`)
855
+ holocron project status 1234 "In Progress" # set an issue's status on the board by its key (a status of the board's template; --board picks one of several; --dry-run prints the change; asks nothing; the issue must already be on the board)
855
856
  holocron move issues v4 v5 --dry-run # preview carrying the open items of one project board to another; without --dry-run it asks first (--yes skips)
856
857
  holocron doctor project # does each declared board match its template? (read-only; --post shares the failures)
857
858
  holocron dev # the app, its vault variables and the tunnel, in one command (settings: `dev` in holocron.config)
package/dist/cli.mjs CHANGED
@@ -93,6 +93,7 @@ const COMMAND_CONTEXTS = {
93
93
  "new project": "workspace",
94
94
  "close project": "workspace",
95
95
  "setup project": "workspace",
96
+ "project status": "workspace",
96
97
  dev: "workspace",
97
98
  "dev serve": "repo-aware",
98
99
  "new channel": "workspace",
@@ -1133,6 +1134,27 @@ const projectSetupEntry = {
1133
1134
  positionals: [],
1134
1135
  supportsDryRun: true
1135
1136
  };
1137
+ // src/commands/project/project-status/project-status.entry.ts
1138
+ const projectStatusEntry = {
1139
+ name: "project status",
1140
+ description: "Set the status of an issue on the project board, by the issue's key",
1141
+ positionals: [{
1142
+ key: "issue",
1143
+ message: "Issue (#1234, owner/repo#1234 or the tracker's key):",
1144
+ type: "input"
1145
+ }, {
1146
+ key: "status",
1147
+ message: "Status (a name from the board's template):",
1148
+ type: "input"
1149
+ }],
1150
+ options: [{
1151
+ key: "board",
1152
+ flag: "--board",
1153
+ type: "input",
1154
+ message: "Board name (blank = the first declared):"
1155
+ }],
1156
+ supportsDryRun: true
1157
+ };
1136
1158
  // src/commands/project/reconcile/reconcile.entry.ts
1137
1159
  const projectReconcileEntry = {
1138
1160
  name: "reconcile project",
@@ -1677,6 +1699,7 @@ const registry = createCommandRegistry([
1677
1699
  projectCreateEntry,
1678
1700
  projectCloseEntry,
1679
1701
  projectSetupEntry,
1702
+ projectStatusEntry,
1680
1703
  projectReconcileEntry
1681
1704
  ], "interactive-menu");
1682
1705
  /** Every Holocron command, in menu order: what {@link launchMenu} lists and what a leaf handler's prompt reads. */
@@ -5426,17 +5449,17 @@ function terminalPrompt() {
5426
5449
  * `holocron close project <number-or-name> [--yes]` โ€” close an open board. Reversible (the provider can reopen it).
5427
5450
  * Asks first in a terminal; without one it needs `--yes` and is a {@link NonInteractiveError} otherwise.
5428
5451
  */
5429
- const COMMAND$8 = "close project";
5452
+ const COMMAND$9 = "close project";
5430
5453
  async function runProjectClose(input) {
5431
5454
  const print = input.print ?? ((line) => console.log(line));
5432
5455
  const rows = createProjectRows(print, input.logger ?? getLogger());
5433
5456
  const prompt = input.prompt ?? terminalPrompt();
5434
5457
  const dryRun = input.context.dryRun ?? false;
5435
5458
  const done = (closed) => ({
5436
- ...rows.finish(COMMAND$8),
5459
+ ...rows.finish(COMMAND$9),
5437
5460
  closed
5438
5461
  });
5439
- const { projects, options } = await openProjects(input, COMMAND$8);
5462
+ const { projects, options } = await openProjects(input, COMMAND$9);
5440
5463
  print(style.header(`Holocron close project โ€” ${options.owner}${dryRun ? " (dry-run)" : ""}`));
5441
5464
  print("");
5442
5465
  try {
@@ -6493,7 +6516,7 @@ function runCloudflared(token, spawnImpl = spawn) {
6493
6516
  * hostname at it. Both are idempotent, so a second run changes nothing. With `run`, the connector is started in the
6494
6517
  * foreground with the token in its environment. The token is never printed.
6495
6518
  */
6496
- const COMMAND$7 = "new tunnel";
6519
+ const COMMAND$8 = "new tunnel";
6497
6520
  /** Why a provider is missing: its own load error when it failed to load, else how to configure it. */
6498
6521
  function missing(loader, key, hint) {
6499
6522
  const failure = loader.loadFailures().find((f) => f.key === key);
@@ -6518,7 +6541,7 @@ async function runTunnelUp(input) {
6518
6541
  logger[status === "ok" ? "info" : "warn"]({
6519
6542
  status,
6520
6543
  ...summary
6521
- }, COMMAND$7);
6544
+ }, COMMAND$8);
6522
6545
  return {
6523
6546
  status,
6524
6547
  summary,
@@ -6527,7 +6550,7 @@ async function runTunnelUp(input) {
6527
6550
  };
6528
6551
  const loader = input.loader ?? new PluginLoader(input.loaded.resolved, input.context);
6529
6552
  await withSpinner("Loading pluginsโ€ฆ", () => loader.load());
6530
- assertPluginsResolvable(loader, COMMAND$7);
6553
+ assertPluginsResolvable(loader, COMMAND$8);
6531
6554
  const dryRun = input.context.dryRun ?? false;
6532
6555
  print(style.header(`Holocron new tunnel โ€” ${input.hostname}${dryRun ? " (dry-run)" : ""}`));
6533
6556
  print("");
@@ -6651,7 +6674,7 @@ const tunnelUpCommand = {
6651
6674
  * disk or printed (only how many there are). The tunnel and its DNS record are set up the way `holocron new tunnel`
6652
6675
  * does, and the tunnel's connector runs beside the application; Ctrl-C stops both.
6653
6676
  */
6654
- const COMMAND$6 = "dev";
6677
+ const COMMAND$7 = "dev";
6655
6678
  /** The environment the application is told it runs in, which its logger tags every line with. */
6656
6679
  const APP_ENVIRONMENT = "development";
6657
6680
  async function runDev(input) {
@@ -6673,7 +6696,7 @@ async function runDev(input) {
6673
6696
  logger[status === "ok" ? "info" : "warn"]({
6674
6697
  status,
6675
6698
  ...summary
6676
- }, COMMAND$6);
6699
+ }, COMMAND$7);
6677
6700
  return {
6678
6701
  status,
6679
6702
  summary,
@@ -6682,7 +6705,7 @@ async function runDev(input) {
6682
6705
  };
6683
6706
  const loader = input.loader ?? new PluginLoader(input.loaded.resolved, input.context);
6684
6707
  await withSpinner("Loading pluginsโ€ฆ", () => loader.load());
6685
- assertPluginsResolvable(loader, COMMAND$6);
6708
+ assertPluginsResolvable(loader, COMMAND$7);
6686
6709
  const dryRun = input.context.dryRun ?? false;
6687
6710
  const [program, ...args] = input.command;
6688
6711
  const shown = input.command.join(" ");
@@ -11088,6 +11111,12 @@ const BUILTIN_TEMPLATES = {
11088
11111
  color: "YELLOW",
11089
11112
  description: "Currently being worked on"
11090
11113
  },
11114
+ {
11115
+ name: "In Review",
11116
+ category: "review",
11117
+ color: "ORANGE",
11118
+ description: "Pull request is green and waiting on review"
11119
+ },
11091
11120
  {
11092
11121
  name: "Blocked",
11093
11122
  category: "blocked",
@@ -11143,6 +11172,11 @@ const BUILTIN_TEMPLATES = {
11143
11172
  category: "active",
11144
11173
  color: "YELLOW"
11145
11174
  },
11175
+ {
11176
+ name: "In Review",
11177
+ category: "review",
11178
+ color: "ORANGE"
11179
+ },
11146
11180
  {
11147
11181
  name: "Blocked",
11148
11182
  category: "blocked",
@@ -11232,6 +11266,7 @@ const CATEGORIES = [
11232
11266
  "backlog",
11233
11267
  "planned",
11234
11268
  "active",
11269
+ "review",
11235
11270
  "blocked",
11236
11271
  "done"
11237
11272
  ];
@@ -16213,7 +16248,7 @@ function resolveCredentialsFile(base, file, makeDir = (dir) => void mkdirSync(di
16213
16248
  * printed to a screen or left in scrollback; to the clipboard when asked. A regular file as stdout (`> file`) is
16214
16249
  * refused, because it would leave plaintext tokens on disk without any of those protections.
16215
16250
  */
16216
- const COMMAND$5 = "export tokens";
16251
+ const COMMAND$6 = "export tokens";
16217
16252
  /** Plain code-unit order: the same on every machine, whatever its locale. The names it sorts are all different. */
16218
16253
  const compare = (a, b) => a < b ? -1 : 1;
16219
16254
  /** What a variable can be called in a dotenv file and in a shell. */
@@ -16226,7 +16261,7 @@ async function runAuthExport(input) {
16226
16261
  logger.warn({
16227
16262
  status: "fail",
16228
16263
  reason
16229
- }, COMMAND$5);
16264
+ }, COMMAND$6);
16230
16265
  return {
16231
16266
  status: "fail",
16232
16267
  exported: [],
@@ -16277,7 +16312,7 @@ async function runAuthExport(input) {
16277
16312
  });
16278
16313
  }
16279
16314
  }
16280
- if (packages.length > 0 && unavailable.length === packages.length) throw new WorkspaceContextError(COMMAND$5, unavailable);
16315
+ if (packages.length > 0 && unavailable.length === packages.length) throw new WorkspaceContextError(COMMAND$6, unavailable);
16281
16316
  const literals = /* @__PURE__ */ new Map();
16282
16317
  const placeholders = [];
16283
16318
  if (input.only?.length) {
@@ -16415,7 +16450,7 @@ async function runAuthExport(input) {
16415
16450
  unavailable: unavailable.length,
16416
16451
  status,
16417
16452
  destination
16418
- }, COMMAND$5);
16453
+ }, COMMAND$6);
16419
16454
  return {
16420
16455
  status,
16421
16456
  exported,
@@ -19362,18 +19397,18 @@ const authListCommand = {
19362
19397
  * `holocron list projects` โ€” the owner's boards, newest first, with their number, name and state. Read-only, so
19363
19398
  * `--dry-run` changes nothing here.
19364
19399
  */
19365
- const COMMAND$4 = "list projects";
19400
+ const COMMAND$5 = "list projects";
19366
19401
  async function runProjectList(input) {
19367
19402
  const print = input.print ?? ((line) => console.log(line));
19368
19403
  const rows = createProjectRows(print, input.logger ?? getLogger());
19369
- const { projects, options } = await openProjects(input, COMMAND$4);
19404
+ const { projects, options } = await openProjects(input, COMMAND$5);
19370
19405
  print(style.header(`Holocron list projects โ€” ${options.owner}`));
19371
19406
  print("");
19372
19407
  try {
19373
19408
  const boards = (await projects.list(options.owner)).toSorted((a, b) => (b.number ?? 0) - (a.number ?? 0));
19374
19409
  if (boards.length === 0) {
19375
19410
  rows.skip("no boards", options.owner);
19376
- return rows.finish(COMMAND$4);
19411
+ return rows.finish(COMMAND$5);
19377
19412
  }
19378
19413
  const width = Math.max(1, ...boards.map((b) => String(b.number ?? "").length));
19379
19414
  print(style.dim(` ${"#".padEnd(width)} ${"Name".padEnd(32)} State`));
@@ -19383,7 +19418,7 @@ async function runProjectList(input) {
19383
19418
  } catch (err) {
19384
19419
  rows.fail("list", errorMessage(err));
19385
19420
  }
19386
- return rows.finish(COMMAND$4);
19421
+ return rows.finish(COMMAND$5);
19387
19422
  }
19388
19423
  // src/commands/project/project-list/project-list.command.ts
19389
19424
  const projectListCommand = {
@@ -19585,6 +19620,7 @@ const CATEGORY = {
19585
19620
  backlog: "open",
19586
19621
  planned: "open",
19587
19622
  active: "in-progress",
19623
+ review: "in-review",
19588
19624
  blocked: "in-progress",
19589
19625
  done: "done"
19590
19626
  };
@@ -20303,7 +20339,7 @@ const authSetCommand = {
20303
20339
  * file is checked (git ignores it, it is not there already) before the browser opens. Nothing but names and paths is
20304
20340
  * ever printed.
20305
20341
  */
20306
- const COMMAND$3 = "new github-app";
20342
+ const COMMAND$4 = "new github-app";
20307
20343
  const DEFAULT_WEBHOOK_SECRET_VAR = "SENTINEL_WEBHOOK_SECRET";
20308
20344
  async function runGithubAppCreate(input) {
20309
20345
  const print = input.print ?? ((line) => console.error(line));
@@ -20313,7 +20349,7 @@ async function runGithubAppCreate(input) {
20313
20349
  logger.warn({
20314
20350
  status: "fail",
20315
20351
  reason
20316
- }, COMMAND$3);
20352
+ }, COMMAND$4);
20317
20353
  return { status: "fail" };
20318
20354
  };
20319
20355
  if ((input.platform ?? process.platform) === "win32") return refuse("windows", "cannot make the credentials file private on Windows: its mode bits are not enforced");
@@ -20374,7 +20410,7 @@ async function runGithubAppCreate(input) {
20374
20410
  status: "fail",
20375
20411
  reason: "write",
20376
20412
  slug: app.slug
20377
- }, COMMAND$3);
20413
+ }, COMMAND$4);
20378
20414
  for (const line of [`created ${app.slug}, but could not keep its credentials: ${errorMessage(err)}`, `they are shown once: delete the App (${settings}) and run this again`]) print(line);
20379
20415
  return {
20380
20416
  status: "fail",
@@ -20399,7 +20435,7 @@ async function runGithubAppCreate(input) {
20399
20435
  logger.info({
20400
20436
  status,
20401
20437
  slug: app.slug
20402
- }, COMMAND$3);
20438
+ }, COMMAND$4);
20403
20439
  return {
20404
20440
  status,
20405
20441
  slug: app.slug,
@@ -22490,18 +22526,18 @@ const pluginCreateCommand = {
22490
22526
  * templates directory). Idempotent on the title: an open board that has it is not made again; a terminal is asked
22491
22527
  * whether to open the existing one, `--yes` prints its address, and anything else is a {@link NonInteractiveError}.
22492
22528
  */
22493
- const COMMAND$2 = "new project";
22529
+ const COMMAND$3 = "new project";
22494
22530
  async function runProjectCreate(input) {
22495
22531
  const print = input.print ?? ((line) => console.log(line));
22496
22532
  const rows = createProjectRows(print, input.logger ?? getLogger());
22497
22533
  const prompt = input.prompt ?? terminalPrompt();
22498
22534
  const dryRun = input.context.dryRun ?? false;
22499
22535
  const done = (extra = {}) => ({
22500
- ...rows.finish(COMMAND$2),
22536
+ ...rows.finish(COMMAND$3),
22501
22537
  created: false,
22502
22538
  ...extra
22503
22539
  });
22504
- const { projects, options } = await openProjects(input, COMMAND$2);
22540
+ const { projects, options } = await openProjects(input, COMMAND$3);
22505
22541
  const loaded = await loadTemplates(options.templatesDir, input.io ?? createFsTemplatesIo(input.context.repoRoot));
22506
22542
  print(style.header(`Holocron new project โ€” ${options.owner}${dryRun ? " (dry-run)" : ""}`));
22507
22543
  print("");
@@ -25862,7 +25898,7 @@ function findReserved(file) {
25862
25898
  }
25863
25899
  // src/commands/probe/tasks/find-leftovers.ts
25864
25900
  /** The commands that take a task name as their next word: `holocron run`, `turbo run`, `pnpm run`, `pnpm`, ... */
25865
- const COMMAND$1 = String.raw`(?:holocron run|turbo run|pnpm run|npm run|pnpm|yarn)\s+`;
25901
+ const COMMAND$2 = String.raw`(?:holocron run|turbo run|pnpm run|npm run|pnpm|yarn)\s+`;
25866
25902
  /** A regex alternation of `names`, escaped; matches nothing for an empty list. */
25867
25903
  function alternation(names) {
25868
25904
  return names.length === 0 ? "(?!)" : names.map((n) => n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|");
@@ -25889,7 +25925,7 @@ function findLeftovers(files, names, options = {}) {
25889
25925
  const bare = Object.keys(names).filter((n) => !n.includes("."));
25890
25926
  const tail = options.files ? String.raw`(?![\w-])` : String.raw`(?![\w-]|\.ya?ml\b)`;
25891
25927
  const dottedPattern = new RegExp(`(?<![\\w.-])(${alternation(dotted)})${tail}`, "g");
25892
- const barePattern = new RegExp(`(?<![\\w.-])${COMMAND$1}(${alternation(bare)})(?![\\w:-]|\\.\\w)`, "g");
25928
+ const barePattern = new RegExp(`(?<![\\w.-])${COMMAND$2}(${alternation(bare)})(?![\\w:-]|\\.\\w)`, "g");
25893
25929
  return files.flatMap((file) => {
25894
25930
  const lines = file.text.split("\n");
25895
25931
  const field = taskField(file.path);
@@ -26216,6 +26252,120 @@ const probeCommand = {
26216
26252
  })).status === "fail") process.exitCode = 1;
26217
26253
  }
26218
26254
  };
26255
+ // src/commands/project/project-status/project-status.ts
26256
+ /**
26257
+ * `holocron project status <issue> <status>` โ€” set one item's status on a declared board by the issue's key, so nobody
26258
+ * looks up a project item id. The status is a name from the board's template (any case). Only the status changes, and
26259
+ * the item must already be on the board: it is never added here. It asks nothing (a status is easy to set back);
26260
+ * `--dry-run` prints the change and calls no mutator. Prints one line, `<key> <from> โ†’ <to>`.
26261
+ */
26262
+ const COMMAND$1 = "project status";
26263
+ /** `#12`, `12`, `o/r#12` as a repository (or none) and a number; anything else (a Linear key) is undefined. */
26264
+ const parseKey = (key) => {
26265
+ const m = /^(?:([^#\s]+)#|#)?(\d+)$/.exec(key.trim());
26266
+ return m ? {
26267
+ repo: m[1],
26268
+ number: Number(m[2])
26269
+ } : void 0;
26270
+ };
26271
+ async function runProjectStatus(input) {
26272
+ const print = input.print ?? ((line) => console.log(line));
26273
+ const rows = createProjectRows(print, input.logger ?? getLogger());
26274
+ const dryRun = input.context.dryRun ?? false;
26275
+ const failed = (label, detail) => {
26276
+ rows.fail(label, detail);
26277
+ return rows.finish(COMMAND$1);
26278
+ };
26279
+ const { projects, options } = await openProjects(input, COMMAND$1);
26280
+ if (!projects.items || !projects.setStatus) return failed(COMMAND$1, `the \`${projects.providerName}\` provider cannot list items or set a status`);
26281
+ const declared = input.board === void 0 ? options.boards[0] : options.boards.find((b) => b.name === input.board);
26282
+ if (!declared) return failed(input.board === void 0 ? "no boards" : `board ${input.board}`, options.boards.length === 0 ? "declare them in providers.projects: boards: [{ template, name }]" : `not declared; declared boards: ${options.boards.map((b) => b.name).join(", ")}`);
26283
+ try {
26284
+ const template = (await loadTemplates(join(input.context.repoRoot, options.templatesDir), input.io ?? createFsTemplatesIo(input.context.repoRoot))).templates[declared.template];
26285
+ if (!template) return failed(`board ${declared.name}`, `there is no template named "${declared.template}"`);
26286
+ const status = template.statuses.find((s) => s.name.toLowerCase() === input.status.trim().toLowerCase());
26287
+ if (!status) return failed(`status ${input.status}`, `not in template ${template.name}; valid: ${template.statuses.map((s) => s.name).join(", ")}`);
26288
+ const board = await projects.find(options.owner, declared.name);
26289
+ if (!board) return failed(`board ${declared.name}`, "the board does not exist or is closed; run `holocron setup project`");
26290
+ const wanted = input.issue.trim();
26291
+ const parsed = parseKey(wanted);
26292
+ const own = `${input.loaded.resolved.org ?? input.context.org ?? ""}/${input.loaded.resolved.name}`.toLowerCase();
26293
+ const item = (await projects.items(options.owner, board, template)).find((i) => {
26294
+ if (!parsed) return i.key.toLowerCase() === wanted.toLowerCase();
26295
+ const have = parseKey(i.key);
26296
+ if (have?.number !== parsed.number) return false;
26297
+ if (parsed.repo === void 0) return have.repo === void 0;
26298
+ return (have.repo ?? own).toLowerCase() === parsed.repo.toLowerCase();
26299
+ });
26300
+ if (!item) return failed(`${wanted} on board ${declared.name}`, `not on the board; add it first (\`gh project item-add ${board.number ?? "<number>"} --owner ${options.owner} --url <issue url>\`, or turn on the board's auto-add rule)`);
26301
+ const change = `${item.key} ${item.status ?? "no status"} โ†’ ${status.name}`;
26302
+ const done = {
26303
+ status: "ok",
26304
+ summary: {
26305
+ ok: 1,
26306
+ fail: 0,
26307
+ skip: 0
26308
+ },
26309
+ key: item.key,
26310
+ ...item.status ? { from: item.status } : {},
26311
+ to: status.name
26312
+ };
26313
+ if (dryRun) {
26314
+ print(style.skip(`would set ${change}`));
26315
+ return done;
26316
+ }
26317
+ const result = await projects.setStatus(options.owner, board, item.key, status.name);
26318
+ if (result.status !== status.name) return failed(item.key, `refused: still ${result.status}${result.via ? ` (${result.via})` : ""}`);
26319
+ print(result.transitioned ? change : `${change} (already)`);
26320
+ return done;
26321
+ } catch (err) {
26322
+ return failed(COMMAND$1, errorMessage(err));
26323
+ }
26324
+ }
26325
+ // src/commands/project/project-status/project-status.command.ts
26326
+ const projectStatusArgs = (y) => y.positional("issue", {
26327
+ type: "string",
26328
+ demandOption: true,
26329
+ describe: "The issue: #1234, 1234, owner/repo#1234, or the tracker's own key"
26330
+ }).positional("status", {
26331
+ type: "string",
26332
+ demandOption: true,
26333
+ describe: "A status of the board's template, such as 'In Progress'"
26334
+ }).option("board", {
26335
+ type: "string",
26336
+ describe: "The declared board's name (default: the first one declared)"
26337
+ });
26338
+ const projectStatusCommand = {
26339
+ command: "status <issue> <status>",
26340
+ describe: "Set the status of an issue on the project board, by the issue's key",
26341
+ builder: projectStatusArgs,
26342
+ handler: async (argv) => {
26343
+ const tokens = tokenContext(argv.token);
26344
+ if (!tokens) return;
26345
+ const loaded = await loadConfig(argv.cwd);
26346
+ applyResolvedConfig(argv, loaded.resolved);
26347
+ if ((await runProjectStatus({
26348
+ loaded,
26349
+ context: {
26350
+ repoRoot: argv.cwd,
26351
+ dryRun: argv.dryRun,
26352
+ ...tokens,
26353
+ org: resolveOrg(argv, loaded.resolved)
26354
+ },
26355
+ owner: argv.org,
26356
+ issue: String(argv.issue),
26357
+ status: String(argv.status),
26358
+ ...argv.board ? { board: argv.board } : {}
26359
+ })).status === "fail") process.exitCode = 1;
26360
+ }
26361
+ };
26362
+ // src/commands/project/project.command.ts
26363
+ const projectCommand = {
26364
+ command: "project",
26365
+ describe: "Work with the items of a project board",
26366
+ builder: (y) => y.command(projectStatusCommand).command(groupMenu("project")),
26367
+ handler: () => {}
26368
+ };
26219
26369
  // src/commands/provider/provider.ts
26220
26370
  /**
26221
26371
  * `holocron provider [<name> [setup|doctor]]` โ€” what only one provider has. With nothing it lists the providers that
@@ -32028,7 +32178,8 @@ const COMMAND_MODULES = [
32028
32178
  publishCommand,
32029
32179
  deployCommand,
32030
32180
  resolveCommand,
32031
- reconcileCommand
32181
+ reconcileCommand,
32182
+ projectCommand
32032
32183
  ];
32033
32184
  // src/cli/own-package-json.ts
32034
32185
  /**