git-github 0.1.5

git command line plugin of github
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::git;
use std::env;
use std::error::Error;

pub fn list_issues(_remote_name: &str) -> Result<(), Box<dyn Error>> {
    let path = env::current_dir().map_err(|_| "Failed to get current directory")?;
    let repo = git::Repo::new(&path);
    let rt = tokio::runtime::Runtime::new()?;
    let issues = rt.block_on(async { repo.issues().await })?;
    for issue in issues {
        println!("{:?}", issue.title);
    }
    Ok(())
}