Skip to content

Comments

fix(config): add file_key auto-mapping to cfg_default#88

Merged
helizaga merged 1 commit intomainfrom
fix/cfg-default-gtrconfig-mapping
Jan 24, 2026
Merged

fix(config): add file_key auto-mapping to cfg_default#88
helizaga merged 1 commit intomainfrom
fix/cfg-default-gtrconfig-mapping

Conversation

@helizaga
Copy link
Collaborator

@helizaga helizaga commented Jan 24, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Improved consistency in configuration key mapping for gtr.* prefixed keys, ensuring they are properly resolved when used in configuration lookups.

✏️ Tip: You can customize this high-level summary in your review settings.

@helizaga helizaga requested a review from NatoBoram as a code owner January 24, 2026 01:05
@helizaga helizaga enabled auto-merge (squash) January 24, 2026 01:05
@helizaga helizaga disabled auto-merge January 24, 2026 01:05
@helizaga helizaga merged commit dbfbb6f into main Jan 24, 2026
1 check was pending
@helizaga helizaga deleted the fix/cfg-default-gtrconfig-mapping branch January 24, 2026 01:05
@coderabbitai
Copy link

coderabbitai bot commented Jan 24, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

The cfg_default function in lib/config.sh now auto-maps file_key when the provided key starts with gtr. and file_key is empty by calling cfg_map_to_file_key, aligning its behavior with cfg_get_all so the corresponding .gtrconfig key is resolved earlier.

Changes

Cohort / File(s) Summary
Config file_key auto-mapping
lib/config.sh
Added conditional logic in cfg_default to call cfg_map_to_file_key and assign to file_key when the key starts with gtr. and file_key is empty, mirroring cfg_get_all (+5 lines)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 I nudged a key that hid from sight,
Mapped gtr.* by moonlit light,
file_key woke and took its place,
Config smiles across the space,
Hooray—one less missing trace! 🎉

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/cfg-default-gtrconfig-mapping

Comment @coderabbitai help to get the list of available commands and usage tips.

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