fix(#978): parse --force in milestone complete dispatcher so the guard's documented override works (#982)
* fix(#978): parse --force in milestone complete dispatcher so the guard's documented override works The dispatcher built `{ name, archivePhases }` but never parsed `--force`, so `options.force` was always `undefined` and the guard inside `cmdMilestoneComplete` (which tells users to "Re-run with --force to override") could never be bypassed. Add `const force = args.includes('--force')` and pass it into the options object. The guard already honors `options.force` — no changes to milestone.cts needed. Closes #978 * chore(#978): backfill changeset pr number (982) --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@@ -1155,7 +1155,8 @@ async function runCommand(command, args, cwd, raw, defaultValue, originalCommand
|
||||
if (subcommand === 'complete') {
|
||||
const milestoneName = parseMultiwordArg(args, 'name');
|
||||
const archivePhases = args.includes('--archive-phases');
|
||||
milestone.cmdMilestoneComplete(cwd, args[2], { name: milestoneName, archivePhases }, raw);
|
||||
const force = args.includes('--force');
|
||||
milestone.cmdMilestoneComplete(cwd, args[2], { name: milestoneName, archivePhases, force }, raw);
|
||||
} else {
|
||||
error('Unknown milestone subcommand. Available: complete', ERROR_REASON.SDK_UNKNOWN_COMMAND);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user