From cddcbdfc445608fba2734046ae8016f3df07d799 Mon Sep 17 00:00:00 2001 From: dhgoal <153369624+dhgoal@users.noreply.github.com> Date: Wed, 15 Jul 2026 23:09:06 +0200 Subject: [PATCH] chore(miner): remove dead parseJsonFlag from portfolio-queue-cli parseJsonFlag was defined in portfolio-queue-cli.js but never called and never exported. Every subcommand uses the real parsers instead (parseQueueListArgs, parseQueueNextArgs, parseRepoIdentifierArgs, parseQueueClaimBatchArgs), which is why it carried the same #4847 comment verbatim as parseRepoIdentifierArgs -- a superseded early draft that was never deleted. Verified repo-wide that it has zero callers. plan-store-cli.js defines its own separate module-scoped parseJsonFlag that is still in use and is left untouched. Closes #6164 --- .../loopover-miner/lib/portfolio-queue-cli.js | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/packages/loopover-miner/lib/portfolio-queue-cli.js b/packages/loopover-miner/lib/portfolio-queue-cli.js index 336f1e582..ffc522b94 100644 --- a/packages/loopover-miner/lib/portfolio-queue-cli.js +++ b/packages/loopover-miner/lib/portfolio-queue-cli.js @@ -25,29 +25,6 @@ function parseRepoArg(value, usage) { return { repoFullName: `${owner}/${repo}` }; } -function parseJsonFlag(args) { - const options = { json: false, dryRun: false }; - const positional = []; - - for (const token of args) { - if (token === "--json") { - options.json = true; - continue; - } - // #4847: reports what a real mutation would do and returns before opening the portfolio queue at all. - if (token === "--dry-run") { - options.dryRun = true; - continue; - } - if (token.startsWith("-")) { - return { error: `Unknown option: ${token}` }; - } - positional.push(token); - } - - return { positional, ...options }; -} - export function parseQueueListArgs(args) { const options = { json: false, repoFullName: null }; const positional = [];