refactor: move gitea out of the way

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2023-08-01 16:38:30 +02:00
parent 39db4b8d1c
commit e51454088e
11 changed files with 481 additions and 277 deletions

View File

@@ -1,6 +1,6 @@
use std::sync::{Arc, Mutex};
use clap::Args;
use clap::{Args, ValueEnum};
pub type StdinFn = Option<Arc<Mutex<dyn Fn() -> anyhow::Result<String> + Send + Sync + 'static>>>;
@@ -35,4 +35,27 @@ EOF
config-stdin will consume stdin until the channel is closed via. EOF"
)]
pub config_stdin: bool,
#[arg(
env = "CUDDLE_PLEASE_NO_VCS",
long,
global = true,
help_heading = "Global"
)]
pub no_vcs: bool,
#[arg(
env = "CUDDLE_PLEASE_ENGINE",
long,
global = true,
help_heading = "Global",
default_value = "gitea"
)]
pub engine: RemoteEngine,
}
#[derive(ValueEnum, Clone, Debug)]
pub enum RemoteEngine {
Local,
Gitea,
}