orcs 0.0.8

Microservices monorepo orchestration tool
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::error::Error;
use git2::{Config, Repository};

pub fn get_user_info() -> Result<String, Error> {
    let config = Config::open_default()?;
    let name = config.get_string("user.name")?;
    let email = config.get_string("user.email")?;
    Ok(format!("{} <{}>", name, email))
}

pub fn init_repo(project_path: &str) -> Result<(), Error> {
    Repository::init(project_path)?;
    Ok(())
}