vcs-gitlab
Automate GitLab from Rust through the glab CLI and process execution. Part
of the vcs-toolkit-rs workspace.
Typed, async commands over the GitLab CLI (glab) that deserialize
glab … --output json (GitLab's REST JSON) into structs, behind a mockable
interface. Commands run inside an OS job (via processkit) so no glab
subprocess is ever orphaned, return the structured Error, and honour an
optional timeout. The surface is the lean merge-request lifecycle; the
vcs-forge facade unifies this with
vcs-github and vcs-gitea.
📖 Full guide: on docs.rs
Inside an async context (every method is async):
use Path;
use ;
let glab = new;
let mrs = glab.mr_list.await?; // Vec<MergeRequest>
let authed = glab.auth_status.await?; // bool — true when `glab auth status` exits 0
Inspect the project and open a merge request
use Path;
use ;
# async
Consumers depend on the GitLabApi trait and substitute a fake in tests — enable
the mock feature for a mockall-generated MockGitLabApi, or inject a fake
process runner with GitLab::with_runner(processkit::ScriptedRunner::new()…):
use ;
use Path;
use ;
# async
Requires the glab binary on PATH (authenticated via glab auth login).
License
MIT