feat: config file support, multi-org, and CI release fix#14
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
~/.config/github-pokemon/config.yamland run with no arguments. Both the root command andprune-archivedsubcommand support config-driven multi-org execution.runRootCommandandrunPruneArchivednow accept org/path as parameters instead of mutating package-level variables, eliminating shared mutable state during multi-org iteration.GITHUB_TOKENdon't trigger other workflows. Chained GoReleaser directly into the release-please workflow and setmode: appendso binaries attach to the existing release.prune-archived,--config,--include-archived,--no-colorflags, and fixes allgithub-repo-managerreferences togithub-pokemon.Test plan
github-pokemon --org X --path Ystill works (single-org backward compat)github-pokemonwith no args reads from config filegithub-pokemon --config /path/to/custom.yamluses custom configgithub-pokemon prune-archivedworks with both flags and config--orgor only--pathprovided