Skip to content

Improve local config list and set handling #60

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 22, 2023
Merged

Improve local config list and set handling #60

merged 4 commits into from
Feb 22, 2023

Conversation

zurawiki
Copy link
Owner

[e2e/test_config_local_list_get_set.sh]

  • Add a temporary directory and git init to the test script
  • Add checks to ensure the output of gptcommit config list is valid TOML
  • Add checks to ensure the default value is returned when deleting a local configuration setting

[e2e/test_config_local_list_get_set.sh]
- Add a temporary directory and git init to the test script
- Add checks to ensure the output of `gptcommit config list` is valid TOML
- Add checks to ensure the default value is returned when deleting a local configuration setting
- Add tests for local list get and set of OpenAI model
- Add `get_config_path` function for retrieving either local or user config path
- Update `delete` and `set` functions to use `get_config_path` function
- Add async-std dependency and update anyhow and async-trait versions

[e2e/test_config_local_list_get_set.sh]
- Add tests for local list get and set of OpenAI model
- Assert that local config set and delete fail when not using --local flag
- Assert that local config get returns the correct value after setting and deleting with --local flag
[src/actions/config.rs]
- Add `async_std::path::Path` to the imports
- Change the `get_config_path` function to handle both local and user config paths
- Add `get_config_path` function for retrieving either local or user config path
- Add error handling to the `delete` and `set` functions for when no config path is found
- Update the `delete` and `set` functions to use the `get_config_path` function
[Cargo.toml]
- Add async-std dependency
- Update anyhow and async-trait versions
@zurawiki zurawiki merged commit 835840d into main Feb 22, 2023
@zurawiki zurawiki deleted the pr-54 branch February 22, 2023 22:55
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