feat(autoconf): auto-mount home config files (e.g. .gitconfig)#445
feat(autoconf): auto-mount home config files (e.g. .gitconfig)#445feloy merged 2 commits intoopenkaiden:mainfrom
Conversation
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR adds automatic detection and mounting of home directory configuration files into workspace containers. A detector scans for registered config files (currently ChangesHome Config Files Auto-mounting
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@pkg/autoconf/autoconfhomeconfigfiles_test.go`:
- Around line 104-106: The helper function alwaysGlobalHomeConfig is currently
unused and triggers a golangci-lint "unused" error; either remove the function
alwaysGlobalHomeConfig entirely from
pkg/autoconf/autoconfhomeconfigfiles_test.go, or replace one of the existing
inline lambdas used in tests with this named function (i.e., pass
alwaysGlobalHomeConfig where a
HomeConfigFilesConfigTargetOption->HomeConfigFilesConfigTarget selection is
required) so it becomes referenced; update imports if necessary after removal.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ebec183a-e0bf-4a74-aed4-5de24dd3b7fa
📒 Files selected for processing (12)
.agents/skills/working-with-autoconf/SKILL.mdAGENTS.mdREADME.mdpkg/autoconf/autoconf_test.gopkg/autoconf/autoconfhomeconfigfiles.gopkg/autoconf/autoconfhomeconfigfiles_test.gopkg/autoconf/detecthomeconfigfiles.gopkg/autoconf/detecthomeconfigfiles_test.gopkg/cmd/autoconf.gopkg/cmd/autoconf_test.gopkg/config/projectsupdater.gopkg/config/projectsupdater_test.go
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Adds a generic mechanism to detect and mount host home-directory config files read-only into workspace containers via `kdn autoconf`. Files are registered in a central list (starting with .gitconfig); adding a new one requires only a single entry. Host and container paths are kept separate to handle platform differences on Windows. Users are offered three config targets (global, project, local), the same flow as for secrets. Already-mounted files are skipped. Fixes a bug where a mount present only in the global config was also reported as present in the project config, because the project loader merges global into its result. Adds AddMount to ProjectConfigUpdater (idempotent by host+target pair). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Philippe Martin <phmartin@redhat.com>
Signed-off-by: Philippe Martin <phmartin@redhat.com>
Adds a generic mechanism to detect and mount host home-directory config files read-only into workspace containers via
kdn autoconf. Files are registered in a central list (starting with .gitconfig); adding a new one requires only a single entry. Host and container paths are kept separate to handle platform differences on Windows.Users are offered three config targets (global, project, local), the same flow as for secrets. Already-mounted files are skipped. Fixes a bug where a mount present only in the global config was also reported as present in the project config, because the project loader merges global into its result.
Adds AddMount to ProjectConfigUpdater (idempotent by host+target pair).
Part of #377