PatchFlowDocs
Reference

Configuration reference

Every repository, timing, model, gate, and operational-policy setting.

Open Markdown ↗

Complete example

patchflow.config.json
{
  "repos": [{
    "url": "https://github.com/acme/checkout",
    "startingRef": "main",
    "packages": ["stripe"],
    "setupCommand": "auto",
    "testCommand": "npm test",
    "testGate": "checks",
    "requiredChecks": ["lint", "test"],
    "testEnvPassthrough": []
  }],
  "pollIntervalMinutes": 60,
  "model": "composer-2.5",
  "checkTimeoutMinutes": 15,
  "checkPollIntervalSeconds": 20,
  "checkStabilizationSeconds": 60,
  "policies": {
    "allowedUpdateTypes": ["patch", "minor", "major"],
    "packageAllowlist": [],
    "packageDenylist": [],
    "maxConcurrentMigrations": 1,
    "maxRunsPerCycle": 10,
    "cooldownMinutes": 60,
    "draftPullRequests": true,
    "maxRetries": 1,
    "maxAttemptsPerVersion": 2,
    "diffPolicy": {
      "maxChangedFiles": 50,
      "forbiddenPaths": [".github/workflows/", ".github/actions/"],
      "requireManifestBump": true
    }
  }
}

Repository fields

FieldDefaultNotes
startingRefmainAgent base branch
setupCommandautoauto, none, or a shell command
testCommandnpm testRuns only after setup succeeds
testGateautoauto, checks, or local
requiredChecks[]Exact GitHub Check names
testEnvPassthrough[]Extra environment variable names the test command may see

Timing

FieldRange/default
pollIntervalMinutesabove 0; default 60
checkTimeoutMinutesabove 0; default 15
checkPollIntervalSecondsabove 0; default 20
checkStabilizationSeconds0 or greater; default 60

Policy limits

FieldRange/default
maxConcurrentMigrations1–10; default 1
maxRunsPerCycle1–100; default 10
cooldownMinutes0 or greater; default 60
maxRetries0–3; default 1
maxAttemptsPerVersion1–20; default 2
draftPullRequestsdefault true

Diff policy

FieldRange/default
diffPolicy.maxChangedFiles1 or more; default 50
diffPolicy.forbiddenPathsdefault [".github/workflows/", ".github/actions/"]
diffPolicy.requireManifestBumpdefault true
NextRun states and labels