git push before it leaves your machine. If any file in your workspace scores below your configured health threshold, the push is blocked and the offending files are listed — so broken code never reaches your remote.
The git pre-push hook requires Iris Pro.
Installing
Run Iris: Install Git Hook from the command palette. Iris writes the hook to.git/hooks/pre-push and makes it executable automatically. On first activation in a git repo, Iris offers to install the hook for you — if you dismiss the prompt, that decision is stored per-workspace and you won’t be prompted again.
What the hook does
Each time you rungit push, the hook:
- Resolves the workspace root via
git rev-parse --show-toplevel - Runs
iris checkagainst your workspace using the bundled CLI - Blocks the push and lists offending files if any file score falls below
minHealthScore - Exits cleanly and allows the push to proceed if all files pass
Configuring the threshold
Set"minHealthScore" in your .irisconfig.json to control the minimum acceptable score. The default is 70 if the key is absent.
"gateBaselineMode": true so existing files are judged against their locked baseline score instead of only the absolute minimum. New files still use minHealthScore — useful for older codebases that want to stop regressions without requiring a full cleanup upfront.