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:

  • version is present
  • warn_risk_scoreblock_risk_score
  • warn_diff_linesmax_diff_lines
  • warn_files_changedmax_files_changed

Base ref resolution

When --base is not provided, DiffPulse resolves the base ref in order:

  1. Upstream tracking branch remote default
  2. main if it exists
  3. master as 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