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_JOBS=4 cargo build --workspace
cargo fmt --check
CARGO_BUILD_JOBS=4 cargo clippy -- -D warnings
CARGO_BUILD_JOBS=4 cargo check --workspace
CARGO_BUILD_JOBS=4 cargo test --workspace
CARGO_BUILD_JOBS=4 cargo llvm-cov --fail-under-lines 80 --workspace
CARGO_BUILD_JOBS=4 cargo build --releaseGit hooks are managed by Lefthook. Install hooks once after cloning:
lefthook installThe configured pre-commit hook runs formatting, clippy, a workspace build, and the workspace coverage gate. There is no configured pre-push hook.
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.gitfleetis the product CLI crate and 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 and GitLab APIs. They require an explicit token and test
repository for the active provider, and clean up mutations during teardown.
Run them only against a dedicated test repository.
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.