Skip to content

feat: config file support, multi-org, and CI release fix#14

Merged
utahcon merged 5 commits intomainfrom
fix/prune-confirm-flag
Mar 18, 2026
Merged

feat: config file support, multi-org, and CI release fix#14
utahcon merged 5 commits intomainfrom
fix/prune-confirm-flag

Conversation

@utahcon
Copy link
Copy Markdown
Owner

@utahcon utahcon commented Mar 18, 2026

Summary

  • Config file support: Users can define multiple org/path pairs in ~/.config/github-pokemon/config.yaml and run with no arguments. Both the root command and prune-archived subcommand support config-driven multi-org execution.
  • Refactor global state: runRootCommand and runPruneArchived now accept org/path as parameters instead of mutating package-level variables, eliminating shared mutable state during multi-org iteration.
  • Fix CI releases: GoReleaser never ran after v1.0.0 because tags created by GITHUB_TOKEN don't trigger other workflows. Chained GoReleaser directly into the release-please workflow and set mode: append so binaries attach to the existing release.
  • README update: Documents config file, prune-archived, --config, --include-archived, --no-color flags, and fixes all github-repo-manager references to github-pokemon.

Test plan

  • github-pokemon --org X --path Y still works (single-org backward compat)
  • github-pokemon with no args reads from config file
  • github-pokemon --config /path/to/custom.yaml uses custom config
  • github-pokemon prune-archived works with both flags and config
  • Error when only --org or only --path provided
  • Clear error when no flags and no config file exists
  • Merge to main triggers release-please, which chains into GoReleaser
  • Release has cross-compiled binaries attached (linux/darwin/windows, amd64/arm64)

utahcon added 5 commits March 18, 2026 09:40
Users can now define multiple org/path pairs in a YAML config file
(~/.config/github-pokemon/config.yaml) and run the tool with no
arguments. CLI flags still work for single-org mode. Both the root
command and prune-archived subcommand support config-driven execution.

Also refactors runRootCommand and runPruneArchived to accept org/path
as parameters instead of reading global variables, eliminating shared
mutable state during multi-org iteration.
Adds documentation for config file support, prune-archived subcommand,
--config, --include-archived, and --no-color flags. Fixes all references
from github-repo-manager to github-pokemon.
Tags created by GITHUB_TOKEN in a workflow don't trigger other
workflows, so GoReleaser never ran for any release after v1.0.0.
Adds a goreleaser job to release-please.yml that runs when a release
is created, and sets mode: append in .goreleaser.yml so assets are
attached to the existing release-please release.
When a user runs with --org and --path flags and the command succeeds,
prompt them to save that org/path pair to the config file for future
use. Skips the prompt if the entry already exists in config.
When a user passes --org without --path, look up the org in the config
file and use the stored path. Returns a clear error if the org isn't
found in config. Applies to both the root command and prune-archived.
@utahcon utahcon merged commit 2a7451d into main Mar 18, 2026
4 checks passed
@utahcon utahcon deleted the fix/prune-confirm-flag branch March 18, 2026 16:21
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