feat: with git username and email in config
Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
@@ -89,7 +89,7 @@ impl Command {
|
||||
|
||||
pub fn execute(self, current_dir: Option<&Path>) -> anyhow::Result<()> {
|
||||
let config = self.build_config(current_dir)?;
|
||||
let git_client = self.get_git(config.get_source())?;
|
||||
let git_client = self.get_git(&config)?;
|
||||
let gitea_client = self.get_gitea_client(&config);
|
||||
|
||||
match &self.commands {
|
||||
@@ -131,11 +131,15 @@ impl Command {
|
||||
Ok(config)
|
||||
}
|
||||
|
||||
fn get_git(&self, current_dir: &Path) -> anyhow::Result<VcsClient> {
|
||||
fn get_git(&self, config: &PleaseConfig) -> anyhow::Result<VcsClient> {
|
||||
if self.global.no_vcs {
|
||||
Ok(VcsClient::new_noop())
|
||||
} else {
|
||||
VcsClient::new_git(current_dir)
|
||||
VcsClient::new_git(
|
||||
config.get_source(),
|
||||
config.settings.git_username.clone(),
|
||||
config.settings.git_email.clone(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user