diff options
| author | Max Audron <audron@cocaine.farm> | 2022-06-07 12:28:18 +0200 |
|---|---|---|
| committer | Maximilian Manz <maximilian.manz@de.clara.net> | 2022-06-20 11:33:04 +0200 |
| commit | f869c7f52d8fd1f1ef61e218bbec4d0dac27673d (patch) | |
| tree | 8029b33976fc897a4ae81785e622a7e61ad2eb67 /src/forge/gitlab/config.rs | |
init
Diffstat (limited to 'src/forge/gitlab/config.rs')
| -rw-r--r-- | src/forge/gitlab/config.rs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/forge/gitlab/config.rs b/src/forge/gitlab/config.rs new file mode 100644 index 0000000..37186e8 --- /dev/null +++ b/src/forge/gitlab/config.rs @@ -0,0 +1,26 @@ +use serde::{Deserialize, Serialize}; +use std::path::PathBuf; + +use crate::config::ForgeConfigTrait; + +#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug, Deserialize, Serialize)] +pub struct Gitlab { + // pub url: url::Url, + pub host: String, + pub token: String, + pub directory: PathBuf, + #[serde(default = "default_tls")] + pub tls: bool, + #[serde(default)] + pub auto_create_branches: bool, +} + +const fn default_tls() -> bool { + true +} + +impl ForgeConfigTrait for Gitlab { + fn root(&self) -> &str { + self.directory.to_str().unwrap() + } +} |
