Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(config)!: simplify secrets config
Internally tag the `Secrets` enum to simplify configurations. Previously, providing secrets in the main config was quite the hassle: ```toml [secrets.Plaintext.github] token = "token" ``` This implicitly uses the `Plaintext` auth option, to provide secrets from the main config directly. Having a more explicit (and simpler) way to configure this makes configuration less confusing. Thus, make auth configuration internally tagged. The config now accepts a `secrets.type` which can be one of "Plaintext", "SecretsFile", or "Keyring". BREAKING CHANGE: Old configurations will break. Users will need to change the `secrets` section of their configuration: ```toml [secrets] type = "Keyring" ``` Replaces the old `secrets = "Keyring" to use the system keyring to store secrets. ```toml [secrets] type = "SecretsFile" file = "path/to/file.toml" ``` Replaces the old way to store secrets in a separate plaintext secrets file. ```toml [secrets] type = "Plaintext" [secrets.your_remote] token = "token" [secrets.remote] username = "user" password = "password" ``` Replaces the old way to store secrets inline. Instead of the old `[secrets.Plaintext.<provider>`, the config now directly uses `[secrets.<provider>`, with a section to denote the type to use (`secrets.type`).
- Loading branch information