From f1b9a373d5f2dcfa061d6a21d986e726dc0842dd Mon Sep 17 00:00:00 2001 From: kjuulh Date: Fri, 13 Sep 2024 20:57:51 +0200 Subject: [PATCH] chore: removed unused code get_config for gitea no longer requires a user for basic auth Signed-off-by: kjuulh --- crates/gitnow/src/git_provider/gitea.rs | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/crates/gitnow/src/git_provider/gitea.rs b/crates/gitnow/src/git_provider/gitea.rs index 3d1ce5b..d8b9979 100644 --- a/crates/gitnow/src/git_provider/gitea.rs +++ b/crates/gitnow/src/git_provider/gitea.rs @@ -200,31 +200,6 @@ impl GiteaProvider { Ok(repos) } - // fn get_config_from_user( - // &self, - // api: &str, - // user: &str, - // access_token: Option<&GiteaAccessToken>, - // ) -> anyhow::Result { - // let mut config = gitea_rs::apis::configuration::Configuration::new(); - // config.base_path = api.into(); - // match access_token { - // Some(GiteaAccessToken::Env { env }) => { - // let token = - // std::env::var(env).context(format!("{env} didn't have a valid value"))?; - - // // config.basic_auth = Some((user.into(), Some(token))); - // config.basic_auth = Some(("".into(), Some(token))); - // } - // Some(GiteaAccessToken::Direct(var)) => { - // config.basic_auth = Some(("".into(), Some(var.to_owned()))); - // } - // None => {} - // } - - // Ok(config) - // } - fn get_config( &self, api: &str,