Skip to content

Contributing

Thanks for helping Heimdall keep watch. This page mirrors CONTRIBUTING.md.

By taking part you agree to follow the Code of Conduct. Found a security problem? Read the security policy instead of opening an issue.

main is protected. Nothing lands on it except through a pull request that:

  1. passes every required CI check (formatting, lints, tests, Helm chart validation, dependency audit, image build);
  2. is approved by a code owner;
  3. has all review conversations resolved;
  4. is up to date with main (squash merge keeps history linear).

Direct pushes and force pushes to main are blocked for everyone.

You need Rust (stable), Docker and, for chart work, Helm.

Terminal window
git clone https://github.com/mrashed98/heimdall.git
cd heimdall
docker compose -f docker-compose.dev.yml up -d # Postgres on localhost:5433
export DATABASE_URL=postgres://heimdall:heimdall@localhost:5433/heimdall
cargo test

Run the same checks CI runs:

Terminal window
cargo fmt --check
cargo clippy --all-targets -- -D warnings
cargo test
helm lint deploy/helm/heimdall
  • Small and focused. One problem per pull request. Open an issue first for anything large, so you can agree on the approach before writing code.
  • Tested first. Write the test that fails without your change, then make it pass. Database tests use #[sqlx::test]; HTTP clients are tested against wiremock. No real network calls in tests.
  • Readable Rust. Heimdall is meant to be maintainable by people still learning Rust: plain structs and enums, no custom macros, anyhow::Result in app code, and comments that explain why when ownership shapes the code.
  • Fits the budget. Heimdall must run in 1 GB RAM and 1 CPU. Avoid loading whole tables into memory or adding heavy dependencies.
  • Uses the project’s words. Terms such as Realm, Finding, Oath and Release are defined in the glossary. Hard-to-reverse decisions are recorded in the architecture decisions; if your change revisits one, update or supersede the ADR in the same pull request.

Use Conventional Commits: feat:, fix:, docs:, refactor:, test:, chore:. The pull request title becomes the squash commit, so make it one of these.

The documentation lives in docs/site/ (Astro Starlight). See its README to run it locally. The build fails on broken internal links.

Maintainers tag releases as vMAJOR.MINOR.PATCH. A tag builds the release binaries and the multi-arch container images and publishes them to GitHub Releases and GHCR.

By contributing, you agree that your contributions are licensed under the Apache License 2.0.