vcs-gitea
Automate Gitea (and Forgejo) from Rust through the tea CLI and process
execution. Part of the vcs-toolkit-rs
workspace.
Typed, async commands over the Gitea CLI (tea) that deserialize
tea … --output json (tea's print-table for lists, a typed object for the issue
detail view — not the Gitea REST shape) into structs, behind a mockable
interface. Commands run inside an OS job (via processkit) so no
tea subprocess is ever orphaned, return the structured Error, and honour an
optional timeout. The vcs-forge facade
unifies this with vcs-github and vcs-gitlab.
📖 Full guide: on docs.rs
tea's surface is narrower than gh/glab: it has no single-PR view (this
crate synthesizes pr_view by listing and filtering), no current-repo view,
no draft toggle, and no PR-checks command — so those operations are absent
here (the facade reports them as Unsupported for the Gitea backend).
Inside an async context (every method is async):
use Path;
use ;
let tea = new;
let prs = tea.pr_list.await?; // Vec<PullRequest>
let authed = tea.auth_status.await?; // bool — true when a login is configured
Open and merge a pull request
use Path;
use ;
# async
Consumers depend on the GiteaApi trait and substitute a fake in tests — enable
the mock feature for a mockall-generated MockGiteaApi, or inject a fake
process runner with Gitea::with_runner(processkit::ScriptedRunner::new()…):
use ;
use Path;
use ;
# async
Requires the tea binary on PATH (configured via tea login add).
License
MIT