Skip to content

fix: replace --dry-run flag with --confirm for prune-archived#12

Merged
utahcon merged 1 commit intomainfrom
fix/prune-confirm-flag
Mar 9, 2026
Merged

fix: replace --dry-run flag with --confirm for prune-archived#12
utahcon merged 1 commit intomainfrom
fix/prune-confirm-flag

Conversation

@utahcon
Copy link
Copy Markdown
Owner

@utahcon utahcon commented Mar 9, 2026

Summary

  • Replace --dry-run (default true) with --confirm (default false) on the prune-archived subcommand
  • Fixes issue where --dry-run false (with space) silently ignored the value due to Cobra boolean flag parsing requiring = syntax
  • Updates help text and dry-run output to reference the new --confirm flag

Test plan

  • Run github-pokemon prune-archived --org <org> --path <path> — should show dry-run output
  • Run github-pokemon prune-archived --org <org> --path <path> --confirm — should actually remove archived repos
  • Verify --help shows updated flag description

The --dry-run boolean flag (default true) was unusable because Cobra
boolean flags require --flag=false syntax (with =), and --flag false
(with space) silently ignores the value. Replace with a --confirm flag
(default false) so dry-run is the implicit default and users opt in to
deletion with --confirm.
@utahcon utahcon merged commit 124cd28 into main Mar 9, 2026
4 checks passed
@utahcon utahcon deleted the fix/prune-confirm-flag branch March 9, 2026 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant