This PR handles 3 main topics:
- It adds configurations files (yay 😬) to
codeberg-cliwhich can be used on the app level. Currently 4 levels of configuration sources are accepted:
- local config in a
berg.tomlfile - global config in the systems data directory under the subfolder
.berg-cli/berg.toml - environment variables with the name of the fields in the config prefixed by
BERG, e.g.BERG_BASE_URL - some sensibly picked default values
- It adds the possibility to adjust the
base_urleffectively removing the constrain of the tool that it only works for thecodeberg.orgdomain - Includes some local testing infra setup as well as some of the first snapshot tests
Todo
- replace the
.configextension with.tomlsince it's a TOML file tools will probably use the extension for detection - add output tests for
berg config --help
Related to
This PR handles 3 main topics:
1. It adds configurations files (yay 😬) to `codeberg-cli` which can be used on the app level. Currently 4 levels of configuration sources are accepted:
- local config in a `berg.toml` file
- global config in the systems data directory under the subfolder `.berg-cli/berg.toml`
- environment variables with the name of the fields in the config prefixed by `BERG`, e.g. `BERG_BASE_URL`
- some sensibly picked default values
2. It adds the possibility to adjust the `base_url` effectively removing the constrain of the tool that it only works for the `codeberg.org` domain
3. Includes some local testing infra setup as well as some of the first snapshot tests
### Todo
- [x] replace the `.config` extension with `.toml` since it's a TOML file tools will probably use the extension for detection
- [x] add output tests for `berg config --help`
### Related to
- #108
- #90
- #84