Skip to main content

Add Reikon to CI

rei’s exit codes — 0 clean, 1 warnings, 2 errors/failing health — are designed to gate a CI step directly, no wrapper script needed.

GitHub Actions

This fails the job (exit code 1 or 2) if the health score drops below your configured thresholds. A shallow checkout will skew bus factor, churn, and commit-quality numbers since they’re computed from full commit history — fetch-depth: 0 matters here, it’s not just a safe default.

Tuning the gate

By default, the job fails (exit 2) only below a health score of 50, and warns (exit 1, doesn’t fail the job unless you check for it) below 70. Adjust both in .reikon/config.json:

Failing the job on warnings too

rei’s own exit code already distinguishes warn (1) from fail (2) — if you want warnings to fail the build as well, just don’t special-case exit code 1:
If you’d rather warnings not fail the build (only hard failures should), check the exit code explicitly:

Posting results as a JSON artifact

Other CI systems

The same pattern applies anywhere that can run a shell command and check its exit code — GitLab CI, CircleCI, Jenkins, etc. The only GitHub-Actions-specific part above is the YAML syntax; rei’s behavior is identical everywhere.

Next

Full CLI reference for every flag and the complete config shape.