[][src]Function ci_info::get

pub fn get() -> CiInfo

Loads and returns the CI info of the current environment.

Example

extern crate ci_info;

fn main() {
    let info = ci_info::get();

    println!("Is CI: {}", info.ci);
    if info.ci {
        println!("Vendor: {:#?}", info.vendor.unwrap());
    }
    if info.vendor.is_some() {
        println!("Vendor: {:#?}", info.vendor.unwrap());
       println!("Name: {:#?}", info.name.unwrap());
    }
    if info.pr.is_some() {
        println!("Is PR: {:#?}", info.pr.unwrap());
    }
    if info.branch_name.is_some() {
        println!("Branch Name: {:#?}", info.branch_name.unwrap());
    }
}