When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository, ensuring you follow the Code of Conduct.
Gitfleet is a Rust workspace. Build and test with Cargo:
cargo build # Compile the workspace.
cargo fmt --check # Verify formatting.
cargo clippy -- -D warnings # Run lints with warnings as errors.
cargo check # Type-check without codegen.
cargo test --workspace # Run all unit and integration tests.
cargo llvm-cov --fail-under-lines 80 # Generate coverage report (80% gate).
cargo build --release # Optimized release build.Git hooks are managed by Lefthook. Install hooks once after cloning:
lefthook installPre-commit runs cargo fmt --check and cargo clippy -- -D warnings.
Pre-push runs cargo test --workspace.
Read AGENTS.md for the full architecture contract, crate boundaries, code style, testing strategy, and release rules. Key points:
gitfleet-coreholds provider-neutral types, traits, and infrastructure.gitfleet-providersis the only crate that callsreqwest.gitfleet-cliis a thin surface over shared operations.- Provider wire types must be normalized before crossing the crate boundary.
- Never add raw
println!oreprintln!outside the output layer. - Use
GitfleetErrorenum variants for expected failures.
Unit tests live inside source files in #[cfg(test)] mod tests {} blocks.
Integration tests live in each crate's tests/ directory. Provider tests use
wiremock for HTTP mocking and insta for snapshot normalization. Automated
tests must never make real HTTP requests.
Live playbooks under gitfleet-playbooks/ validate command families against
the real GitHub API. They require explicit credentials and clean up mutations
during teardown.
All commit messages must use a lowercase prefix followed by a colon and space:
feat:— new user-visible behaviorfix:— bug fixrefactor:— code restructure without behavior changechore:— build, release, dependency, or metadata changestests:— test additions or modificationsci:— CI/CD workflow changesdocumentation:— documentation-only changesrepo:— project scaffolding
Subject line: imperative mood, no period, under 50 characters. No scopes. No body.
- Use the pull request template provided in the repository.
- Ensure all gates pass before submitting.
- Rebase your branch on
mainbefore opening a PR. - One logical change per PR.