Skip to content

Add --show-config option#31

Merged
artem-y merged 11 commits into
mainfrom
feat/show-config
May 26, 2026
Merged

Add --show-config option#31
artem-y merged 11 commits into
mainfrom
feat/show-config

Conversation

@artem-y
Copy link
Copy Markdown
Owner

@artem-y artem-y commented May 25, 2026

In this PR:

  • added --show-config option which prints out the current config
  • when the config file exists but is empty, it won't throw error and will instead show an empty config
  • added tests, updated README

@artem-y artem-y self-assigned this May 25, 2026
@artem-y artem-y added the enhancement New feature or request label May 25, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a --show-config CLI option to print the configuration the tool is using, along with config-loading tweaks and accompanying unit/e2e tests and README updates.

Changes:

  • Added --show-config flag to print the current config as formatted JSON.
  • Updated config loading/encoding logic and added unit tests for encoding and empty-config-file behavior.
  • Added an end-to-end test for --show-config and documented the flag in the README.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
internal/config/config.go Adds EncodeConfigAtPath and modifies config reading/validation flow (incl. empty-file handling).
internal/config/config_test.go Updates existing tests for new ReadCommitConfig signature; adds new tests for empty file + encoding behavior.
cmd/commit/main.go Wires --show-config into the CLI flow and prints config JSON to stdout.
e2e.sh Adds an e2e test that validates --show-config output formatting/content.
docs/README.md Documents the new --show-config option.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/config/config.go Outdated
Comment thread cmd/commit/main.go
@artem-y artem-y merged commit e2ff14b into main May 26, 2026
1 check passed
@artem-y artem-y deleted the feat/show-config branch May 26, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants