Crate gitforge[−][src]
Expand description
Uniform access to github and gitlab
Currently, listing and creating merge requests is suppored.
Example
use gitforge::forge; let mut f = forge::Config { kind: "github".parse().ok(), host: "github.com".into(), ..Default::default() } .load_default_token().unwrap() .forge().unwrap(); let req = forge::Req::MergeRequests(forge::Req_MergeRequests{ target_repo: "CVEProject/cvelist".into(), statuses: Some([forge::IssueMrStatus::Open].iter().cloned().collect()), ..Default::default() }); match f.request(&req).unwrap() { forge::Resp::MergeRequests { mrs,.. } => { for mr in mrs { println!("{:?}", &mr); } }, x => panic!("unexpected response {:?}", &x), };
Modules
| forge | Uniform access to github and gitlab |
| hub | GitHub client, talking to one GitHub instance |
| lab | GitLab client, talking to one GitLab instance |