feat: with working main
Some checks failed
continuous-integration/drone/push Build is failing

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2023-08-03 23:31:53 +02:00
parent 8ee05136df
commit 34417f77bc
8 changed files with 178 additions and 55 deletions

View File

@@ -120,7 +120,8 @@ impl Command {
current_dir: Option<&Path>,
) -> anyhow::Result<(PleaseConfig, VcsClient, DynRemoteGitClient)> {
let config = self.build_config(current_dir)?;
let git_client = self.get_git(&config)?;
let git_client =
self.get_git(&config, self.global.token.clone().expect("token to be set"))?;
let gitea_client = self.get_gitea_client(&config);
let filter = match self.global.log_level {
@@ -160,7 +161,7 @@ impl Command {
Ok(config)
}
fn get_git(&self, config: &PleaseConfig) -> anyhow::Result<VcsClient> {
fn get_git(&self, config: &PleaseConfig, token: String) -> anyhow::Result<VcsClient> {
if self.global.no_vcs {
Ok(VcsClient::new_noop())
} else {
@@ -168,6 +169,7 @@ impl Command {
config.get_source(),
config.settings.git_username.clone(),
config.settings.git_email.clone(),
token,
)
}
}