feat(config): allow reading configuration from xdg directories#155
Merged
cococonscious merged 4 commits intocococonscious:mainfrom Nov 30, 2025
Conversation
Created using spr 1.3.7
Created using spr 1.3.7
Created using spr 1.3.7
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
cococonscious
requested changes
Nov 12, 2025
Created using spr 1.3.7
There was a problem hiding this comment.
Pull request overview
This PR adds support for XDG Base Directory specification on macOS by checking the XDG_CONFIG_HOME environment variable when loading configuration files, allowing macOS users who prefer XDG conventions to use them alongside the platform's default configuration directory.
Key Changes:
- Adds xdg crate dependency to read configuration from XDG-compliant directories
- Updates configuration loading logic to check both platform default and XDG config locations
- Improves test infrastructure by configuring git user identity in test repositories
Reviewed changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| Cargo.toml | Adds xdg 3.0 dependency for XDG Base Directory support |
| Cargo.lock | Adds xdg dependency and updates transitive dependencies (windows-sys) |
| src/lib/config.rs | Implements XDG config directory support with updated configuration loading order |
| src/bin/main.rs | Refactors command handling to use idiomatic Rust pattern (if let instead of is_some/unwrap) |
| tests/integration.rs | Adds XDG config integration test and improves test setup by configuring git identity |
| README.md | Documents new XDG config directory in configuration priority order |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
cococonscious
approved these changes
Nov 30, 2025
This was referenced Feb 19, 2025
Closed
Merged
cococonscious
pushed a commit
that referenced
this pull request
Nov 30, 2025
## 🤖 New release * `koji`: 3.2.0 -> 3.3.0 (✓ API compatible changes) <details><summary><i><b>Changelog</b></i></summary><p> <blockquote> ## [3.3.0](v3.2.0...v3.3.0) - 2025-11-30 ### Changed - *(deps)* update codecov/codecov-action action to v5.5.1 ([#143](#143)) - *(deps)* upgrade all dependencies ([#149](#149)) - *(build)* reintroduce musl builds ([#156](#156)) - replace rusty-hook with prek - *(config)* allow reading configuration from xdg directories ([#155](#155)) - update all non-major dependencies ([#136](#136)) - *(deps)* update codecov/codecov-action action to v5.3.1 ([#135](#135)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
On MacOS the "default" configuration directories do not follow the XDG standards.
This change allows the use of those standards on a mac if the environment variable for XDG_CONFIG_HOME has been set.
Closes: #154