Skip to content

vox-forge API Reference (generated)

Crate: vox-forge · Version: 0.6.0 · Target: Library (lib.rs)

Platform-agnostic Git forge API for Vox — GitHub, Gitea, Forgejo (GitLab deprecated)

vox-forge — Platform-agnostic Git forge integration for Vox.

Abstracts Git forges (primarily GitHub) behind a single trait. GitLab is deprecated (2026-06-03) and no longer supported. All forge-specific API logic lives in the per-platform modules below; callers only depend on [GitForgeProvider].

ForgeFeature flagAPI basisSelf-hostableStatus
GitHubgithubREST + GraphQLEnterprise onlySupported
GitLabgitlabREST✅ CE (free)Deprecated (2026-06-03) — unsupported, slated for removal

GitLab is no longer supported. The gitlab module is retained behind the (deprecated) gitlab feature and emits a runtime warning when constructed. New integrations must use GitHub.

All internal Vox code uses ChangeRequest instead of “PR” or “MR”.

FeatureDefault / Enables
default—
gitea—
github—
gitlab—
DependencyKind
vox-http-clientNormal
ModuleDescription
errorError types for forge HTTP/auth/parse failures.
providerGitForgeProvider trait and registry.
typesForge-neutral DTOs (change requests, labels, webhooks, …).
githubGitHub REST (api.github.com or Enterprise base URL).
gitlabGitLab REST API. DEPRECATED (2026-06-03): no longer supported; slated for removal.
Dependency Topology, diagram 14 nodes, 3 edges: vox-forge → vox-http-client; vox-cli-review → vox-forge; vox-publisher → vox-forgevox-forgevox-http-clientvox-cli-reviewvox-publisher
Diagram source
graph {
direction: right
node vox_forge: "vox-forge"
node vox_http_client: "vox-http-client"
vox_forge -> vox_http_client
node vox_cli_review: "vox-cli-review"
vox_cli_review -> vox_forge
node vox_publisher: "vox-publisher"
vox_publisher -> vox_forge
}
Consumer CrateRole
vox-cli-reviewDirect workspace dependent
vox-publisherDirect workspace dependent
KindSymbolSignatureSourceDescription
enumerror::ForgeErrorpub enum ForgeErrorcrates/vox-forge/src/error.rs#L7-L58Errors that can occur when talking to a Git forge.
fnerror::is_retryablepub fn is_retryable(&self) -> boolcrates/vox-forge/src/error.rs#L62-L69Returns true if this error is retryable.
structgithub::GitHubProviderpub struct GitHubProvidercrates/vox-forge/src/github.rs#L21-L28A GitHub forge provider.
fngithub::newpub fn new(token: impl Into<String>) -> Result<Self, ForgeError>crates/vox-forge/src/github.rs#L32-L34Create a new GitHub provider with the given PAT or App token.
fngithub::with_basepub fn with_base(token: impl Into<String>, api_base: &str) -> Result<Self, ForgeError>crates/vox-forge/src/github.rs#L37-L47Create with a custom API base (for GitHub Enterprise).
structgitlab::GitLabProviderpub struct GitLabProvidercrates/vox-forge/src/gitlab.rs#L26-L30A GitLab forge provider.
fngitlab::newpub fn new(token: impl Into<String>) -> Result<Self, ForgeError>crates/vox-forge/src/gitlab.rs#L34-L36Create a provider for gitlab.com.
fngitlab::with_basepub fn with_base(token: impl Into<String>, api_base: &str) -> Result<Self, ForgeError>crates/vox-forge/src/gitlab.rs#L39-L53Create with a custom API base (for self-hosted GitLab).
traitprovider::GitForgeProviderpub trait GitForgeProvider: Send + Synccrates/vox-forge/src/provider.rs#L31-L148A platform-agnostic interface to a Git forge (GitHub and similar REST APIs). Note: the GitLab implementation (the gitlab module/feature) is deprecated (2026-06-03) and no longer supported. Implementations must be Send + Sync for use across async task boundaries. ## Adding a new forge 1. Create src/<forge>.rs with a struct that implements this trait. 2. Add a feature flag <forge> in Cargo.toml. 3. Gate the module behind #[cfg(feature = "<forge>")] in lib.rs. 4. Wire the new forge into ForgeRegistry. ## Terminology Internally Vox uses “ChangeRequest” for what GitHub calls “Pull Request” and GitLab calls “Merge Request”. All trait methods use this neutral term.
structprovider::ForgeRegistrypub struct ForgeRegistrycrates/vox-forge/src/provider.rs#L159-L161A runtime registry of available forge providers. Used by the orchestrator to dispatch forge operations without knowing which concrete platform is in use.
fnprovider::newpub fn new() -> Selfcrates/vox-forge/src/provider.rs#L165-L167Create an empty registry.
fnprovider::registerpub fn register(&mut self, provider: Box<dyn GitForgeProvider>)crates/vox-forge/src/provider.rs#L170-L172Register a forge provider.
fnprovider::getpub fn get(&self, name: &str) -> Option<&dyn GitForgeProvider>crates/vox-forge/src/provider.rs#L175-L180Get the first registered provider by name (case-insensitive).
fnprovider::provider_namespub fn provider_names(&self) -> Vec<&str>crates/vox-forge/src/provider.rs#L183-L185List all registered provider names.
fnprovider::lenpub fn len(&self) -> usizecrates/vox-forge/src/provider.rs#L188-L190Number of registered providers.
fnprovider::is_emptypub fn is_empty(&self) -> boolcrates/vox-forge/src/provider.rs#L193-L195True if no providers are registered.
structtypes::ChangeRequestIdpub struct ChangeRequestId(crates/vox-forge/src/types.rs#L16Forge-neutral identifier for a ChangeRequest (distinct from the human-facing number).
enumtypes::ChangeRequestStatepub enum ChangeRequestStatecrates/vox-forge/src/types.rs#L23-L32State of a ChangeRequest.
enumtypes::ChangeRequestStatuspub enum ChangeRequestStatuscrates/vox-forge/src/types.rs#L36-L47CI/merge status of a ChangeRequest.
structtypes::ChangeRequestpub struct ChangeRequestcrates/vox-forge/src/types.rs#L51-L84A forge-neutral change request (e.g. GitHub pull request or GitLab merge request).
fntypes::is_actionablepub fn is_actionable(&self) -> boolcrates/vox-forge/src/types.rs#L88-L90True if this CR is in an open, non-draft state.
structtypes::NewChangeRequestpub struct NewChangeRequest<'a>crates/vox-forge/src/types.rs#L95-L106Arguments for GitForgeProvider::create_change_request.
structtypes::NewReleasepub struct NewRelease<'a>crates/vox-forge/src/types.rs#L114-L123Arguments for GitForgeProvider::create_release.
structtypes::NewDiscussionOrIssuepub struct NewDiscussionOrIssue<'a>crates/vox-forge/src/types.rs#L131-L138Arguments for GitForgeProvider::create_discussion_or_issue.
structtypes::Labelpub struct Labelcrates/vox-forge/src/types.rs#L146-L153A label on a ChangeRequest or issue.
enumtypes::ReviewStatepub enum ReviewStatecrates/vox-forge/src/types.rs#L161-L172State of a code review.
structtypes::Reviewpub struct Reviewcrates/vox-forge/src/types.rs#L176-L185A code review on a ChangeRequest.
structtypes::ForgeRepoInfopub struct ForgeRepoInfocrates/vox-forge/src/types.rs#L193-L218Forge-neutral repository metadata.
structtypes::ForgeUserpub struct ForgeUsercrates/vox-forge/src/types.rs#L226-L239A forge user account.
enumtypes::WebhookEventpub enum WebhookEventcrates/vox-forge/src/types.rs#L247-L299A webhook event received from a forge.