Configuration
DiffPulse configuration lives in .diffpulse/policy.yaml at your
repository root. The CLI and GitHub Action both read this file by default.
File location
.diffpulse/
policy.yaml
Override with --policy <path> on the CLI or the
policy input on the GitHub Action.
Scaffolding
npx @diffpulse/cli init
Use --force to overwrite existing files. Without
--force, existing policy and workflow files are preserved.
Validation
Validate your policy before committing:
npx @diffpulse/cli config validate Validation checks:
versionis presentwarn_risk_score≤block_risk_scorewarn_diff_lines≤max_diff_lineswarn_files_changed≤max_files_changed
Base ref resolution
When --base is not provided, DiffPulse resolves the base ref in order:
- Upstream tracking branch remote default
mainif it existsmasteras fallback
Set defaults.base_ref in your policy for documentation purposes.
Use --base explicitly in CI for predictable behavior.
Disabling checks
Set any check to false in your policy:
checks:
diff_size: true
file_count: true
sensitive_paths: true
test_presence: false
lockfile_changes: true
binary_files: true CI integration
Run DiffPulse in GitHub Actions on pull requests. See the workflow template
generated by diffpulse init or the
Getting Started guide.
Related
- Policy reference — full field documentation
- CLI reference — commands and options