Skip to content

feat(config): support non-hidden repo config file#23

Merged
takai merged 1 commit into
mainfrom
feat/non-hidden-repo-config
Mar 31, 2026
Merged

feat(config): support non-hidden repo config file#23
takai merged 1 commit into
mainfrom
feat/non-hidden-repo-config

Conversation

@takai

@takai takai commented Mar 31, 2026

Copy link
Copy Markdown
Owner

Summary

  • Support git-ai-commit.toml (non-hidden) as repo config, with fallback to .git-ai-commit.toml for backward compatibility
  • When both exist, the non-hidden file wins silently
  • Rename project's own config to use the new preferred filename
  • Update README to document both filenames

Closes #22

Test plan

  • go test ./... passes
  • New test: TestNonHiddenRepoConfig — only git-ai-commit.toml exists, verify it loads
  • New test: TestNonHiddenRepoConfigPrecedence — both files exist, verify non-hidden wins
  • Existing .git-ai-commit.toml tests still pass (hidden fallback works)

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 57b9b4a3e6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/config/config.go
Comment on lines +305 to +306
if info.IsDir() {
return "", "", fmt.Errorf("repo config is a directory: %s", path)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Continue fallback search when preferred config path is a dir

The new probe order returns an error as soon as git-ai-commit.toml exists but is a directory, so the legacy .git-ai-commit.toml file is never considered. That regresses backward compatibility in repos where a directory with the new name is present (accidentally or from tooling), because previously a valid hidden config would load successfully; now Load() fails before trust/parse can happen.

Useful? React with 👍 / 👎.

@takai takai force-pushed the feat/non-hidden-repo-config branch from 57b9b4a to 3e6ca3c Compare March 31, 2026 21:08
@takai takai merged commit 553b408 into main Mar 31, 2026
1 check passed
@takai takai deleted the feat/non-hidden-repo-config branch March 31, 2026 21:10
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.

Support non-hidden config file: git-ai-commit.toml

1 participant