Expand description
vcs-github — automate GitHub from Rust through the gh CLI.
Async, mockable, and structured-error: consumers depend on the GitHubApi
trait and substitute a mock for the real GitHub client in tests. Commands
run inside an OS job (via processkit) so a gh subprocess is never
orphaned, and honour an optional timeout.
Two test seams: enable the mock feature for a mockall-generated
MockGitHubApi, or inject a fake runner with
GitHub::with_runner(ScriptedRunner).
Structs§
- GitHub
- The real GitHub client. Generic over the
ProcessRunnerso tests can inject a fake process executor;GitHub::new()uses the real job-backed runner. - Issue
- An issue (
gh issue list --json number,title,state). - Process
Result - The captured result of running a process to completion.
- Pull
Request - A pull request (
gh pr list/view --json number,title,state,headRefName,baseRefName,url). - Repo
- A repository (
gh repo view --json name,owner,description,url,isPrivate,defaultBranchRef).
Enums§
- Error
- Errors produced when launching or running a child process.
Constants§
- BINARY
- Name of the underlying CLI binary this crate drives.
Traits§
- GitHub
Api - The GitHub operations this crate exposes — the interface consumers code against and mock in tests.
Type Aliases§
- Result
- Crate result alias.