Skip to content

Configuration reference

Generated from the schema, so it cannot drift from what Dispatch actually accepts. Regenerate with pnpm run docs:generate.

Everything except version has a default, so the smallest valid configuration is:

yaml
version: 1

That gives you shadow mode, the default question catalogue, no rules, and no destructive operations — a Dispatch that decides, logs, and writes nothing.

Top-level keys

KeyTypeRequiredNotes
version1yes
modelstringnoDefault: "jev-latest".
mode"shadow" | "suggest" | "auto"noDefault: "shadow".
repoBriefstringno
budgetobjectnoDefault: {"maxRequestsPerDay":500,"onExhausted":"queue"}.
confidenceobjectnoDefault: {"auto":0.85,"suggest":0.6}.
labelsmapnoDefault: {}.
questionsmapnoDefault: {}.
disableQuestionsstring[]noDefault: [].
allowDestructive"close" | "lock" | "minimize" | "convert_to_discussion"[]noDefault: [].
dedupobjectnoDefault: {"enabled":true,"candidates":30,"reportThreshold":0.75,"includeClosed":true}.
dataobjectnoDefault: {"sendBodies":true,"sendDiffs":true,"maxDiffBytes":20000,"redact":[]}.
rulesobject[]no
escalationsmapnoDefault: {}.
pluginsstring[]noDefault: [].

Nested objects

budget

FieldTypeNotes
maxRequestsPerDayintegerDefault: 500. Maximum 9007199254740991.
onExhausted"queue" | "skip" | "notify"Default: "queue".

confidence

FieldTypeNotes
autonumberMinimum 0. Maximum 1.
suggestnumberMinimum 0. Maximum 1.

dedup

FieldTypeNotes
enabledbooleanDefault: true.
candidatesintegerDefault: 30. Maximum 255.
reportThresholdnumberDefault: 0.75. Minimum 0. Maximum 1.
includeClosedbooleanDefault: true.

data

FieldTypeNotes
sendBodiesbooleanDefault: true.
sendDiffsbooleanDefault: true.
maxDiffBytesintegerDefault: 20000. Maximum 9007199254740991.
redactstring[]Default: [].

rules

FieldTypeNotes
idstring
when"issue.opened" | "issue.edited" | "issue.reopened" | "pull_request.opened" | "pull_request.edited" | "pull_request.ready_for_review" | "pull_request.synchronize" | "issue_comment.created" | "discussion.created" | "schedule" | "command" | "issue.opened" | "issue.edited" | "issue.reopened" | "pull_request.opened" | "pull_request.edited" | "pull_request.ready_for_review" | "pull_request.synchronize" | "issue_comment.created" | "discussion.created" | "schedule" | "command"[]
ifstring
gateOnstring[]
thenunknown[]
confidenceobject
enabledboolean

JSON Schema

Point your editor at this for completion and inline validation:

json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "version": {
      "type": "number",
      "const": 1
    },
    "model": {
      "default": "jev-latest",
      "type": "string",
      "minLength": 1
    },
    "mode": {
      "default": "shadow",
      "type": "string",
      "enum": [
        "shadow",
        "suggest",
        "auto"
      ]
    },
    "repoBrief": {
      "type": "string"
    },
    "budget": {
      "default": {
        "maxRequestsPerDay": 500,
        "onExhausted": "queue"
      },
      "type": "object",
      "properties": {
        "maxRequestsPerDay": {
          "default": 500,
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "onExhausted": {
          "default": "queue",
          "type": "string",
          "enum": [
            "queue",
            "skip",
            "notify"
          ]
        }
      },
      "additionalProperties": false
    },
    "confidence": {
      "default": {
        "auto": 0.85,
        "suggest": 0.6
      },
      "type": "object",
      "properties": {
        "auto": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "suggest": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      },
      "required": [
        "auto",
        "suggest"
      ],
      "additionalProperties": false
    },
    "labels": {
      "default": {},
      "type": "object",
      "propertyNames": {
        "type": "string",
        "minLength": 1
      },
      "additionalProperties": {
        "type": "object",
        "propertyNames": {
          "type": "string",
          "minLength": 1,
          "maxLength": 50
        },
        "additionalProperties": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "questions": {
      "default": {},
      "type": "object",
      "propertyNames": {
        "type": "string",
        "minLength": 1
      },
      "additionalProperties": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "noul"
              },
              "instructions": {
                "$ref": "#/$defs/__schema0"
              },
              "criteria": {
                "type": "object",
                "properties": {
                  "true": {
                    "$ref": "#/$defs/__schema0"
                  },
                  "false": {
                    "$ref": "#/$defs/__schema0"
                  }
                },
                "additionalProperties": false
              }
            },
            "required": [
              "type",
              "instructions"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "choice"
              },
              "instructions": {
                "$ref": "#/$defs/__schema0"
              },
              "criteria": {
                "type": "object",
                "propertyNames": {
                  "type": "string",
                  "minLength": 1
                },
                "additionalProperties": {
                  "$ref": "#/$defs/__schema0"
                }
              }
            },
            "required": [
              "type",
              "instructions",
              "criteria"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "score"
              },
              "instructions": {
                "$ref": "#/$defs/__schema0"
              },
              "criteria": {
                "minItems": 2,
                "type": "array",
                "items": {
                  "$ref": "#/$defs/__schema0"
                }
              }
            },
            "required": [
              "type",
              "instructions",
              "criteria"
            ],
            "additionalProperties": false
          }
        ]
      }
    },
    "disableQuestions": {
      "default": [],
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "allowDestructive": {
      "default": [],
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "close",
          "lock",
          "minimize",
          "convert_to_discussion"
        ]
      }
    },
    "dedup": {
      "default": {
        "enabled": true,
        "candidates": 30,
        "reportThreshold": 0.75,
        "includeClosed": true
      },
      "type": "object",
      "properties": {
        "enabled": {
          "default": true,
          "type": "boolean"
        },
        "candidates": {
          "default": 30,
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 255
        },
        "reportThreshold": {
          "default": 0.75,
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "includeClosed": {
          "default": true,
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "data": {
      "default": {
        "sendBodies": true,
        "sendDiffs": true,
        "maxDiffBytes": 20000,
        "redact": []
      },
      "type": "object",
      "properties": {
        "sendBodies": {
          "default": true,
          "type": "boolean"
        },
        "sendDiffs": {
          "default": true,
          "type": "boolean"
        },
        "maxDiffBytes": {
          "default": 20000,
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "redact": {
          "default": [],
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "rules": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "pattern": "^[a-z0-9][a-z0-9-]*$"
          },
          "when": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "issue.opened",
                  "issue.edited",
                  "issue.reopened",
                  "pull_request.opened",
                  "pull_request.edited",
                  "pull_request.ready_for_review",
                  "pull_request.synchronize",
                  "issue_comment.created",
                  "discussion.created",
                  "schedule",
                  "command"
                ]
              },
              {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "issue.opened",
                    "issue.edited",
                    "issue.reopened",
                    "pull_request.opened",
                    "pull_request.edited",
                    "pull_request.ready_for_review",
                    "pull_request.synchronize",
                    "issue_comment.created",
                    "discussion.created",
                    "schedule",
                    "command"
                  ]
                }
              }
            ]
          },
          "if": {
            "type": "string",
            "minLength": 1
          },
          "gateOn": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "then": {
            "minItems": 1,
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "op": {
                      "type": "string",
                      "const": "label"
                    },
                    "add": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 50
                      }
                    },
                    "remove": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 50
                      }
                    }
                  },
                  "required": [
                    "op"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "op": {
                      "type": "string",
                      "const": "comment"
                    },
                    "template": {
                      "type": "string",
                      "minLength": 1
                    },
                    "key": {
                      "type": "string",
                      "minLength": 1
                    },
                    "data": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "$ref": "#/$defs/__schema0"
                      }
                    }
                  },
                  "required": [
                    "op",
                    "template",
                    "key"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "op": {
                      "type": "string",
                      "const": "close"
                    },
                    "reason": {
                      "type": "string",
                      "enum": [
                        "completed",
                        "not_planned"
                      ]
                    }
                  },
                  "required": [
                    "op",
                    "reason"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "op": {
                      "type": "string",
                      "const": "reopen"
                    }
                  },
                  "required": [
                    "op"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "op": {
                      "type": "string",
                      "const": "lock"
                    },
                    "reason": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "op"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "op": {
                      "type": "string",
                      "const": "minimize"
                    },
                    "target": {
                      "default": "triggering_comment",
                      "type": "string",
                      "const": "triggering_comment"
                    },
                    "reason": {
                      "type": "string",
                      "enum": [
                        "spam",
                        "abuse",
                        "off_topic",
                        "outdated",
                        "duplicate",
                        "resolved",
                        "low_quality"
                      ]
                    }
                  },
                  "required": [
                    "op",
                    "reason"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "op": {
                      "type": "string",
                      "const": "convert_to_discussion"
                    },
                    "category": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "op",
                    "category"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "op": {
                      "type": "string",
                      "const": "assign"
                    },
                    "logins": {
                      "minItems": 1,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      }
                    }
                  },
                  "required": [
                    "op",
                    "logins"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "op": {
                      "type": "string",
                      "const": "request_review"
                    },
                    "logins": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "codeowners": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "op"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "op": {
                      "type": "string",
                      "const": "milestone"
                    },
                    "title": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "op",
                    "title"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "op": {
                      "type": "string",
                      "const": "project_field"
                    },
                    "project": {
                      "type": "string",
                      "minLength": 1
                    },
                    "field": {
                      "type": "string",
                      "minLength": 1
                    },
                    "value": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "op",
                    "project",
                    "field",
                    "value"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "op": {
                      "type": "string",
                      "const": "notify"
                    },
                    "channel": {
                      "type": "string",
                      "minLength": 1
                    },
                    "template": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "op",
                    "channel",
                    "template"
                  ],
                  "additionalProperties": false
                }
              ]
            }
          },
          "confidence": {
            "type": "object",
            "properties": {
              "auto": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "suggest": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              }
            },
            "additionalProperties": false
          },
          "enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "when",
          "then"
        ],
        "additionalProperties": false
      }
    },
    "escalations": {
      "default": {},
      "type": "object",
      "propertyNames": {
        "type": "string",
        "minLength": 1
      },
      "additionalProperties": {
        "type": "object",
        "properties": {
          "afterDays": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "then": {
            "minItems": 1,
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "op": {
                      "type": "string",
                      "const": "label"
                    },
                    "add": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 50
                      }
                    },
                    "remove": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 50
                      }
                    }
                  },
                  "required": [
                    "op"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "op": {
                      "type": "string",
                      "const": "comment"
                    },
                    "template": {
                      "type": "string",
                      "minLength": 1
                    },
                    "key": {
                      "type": "string",
                      "minLength": 1
                    },
                    "data": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "$ref": "#/$defs/__schema0"
                      }
                    }
                  },
                  "required": [
                    "op",
                    "template",
                    "key"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "op": {
                      "type": "string",
                      "const": "close"
                    },
                    "reason": {
                      "type": "string",
                      "enum": [
                        "completed",
                        "not_planned"
                      ]
                    }
                  },
                  "required": [
                    "op",
                    "reason"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "op": {
                      "type": "string",
                      "const": "reopen"
                    }
                  },
                  "required": [
                    "op"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "op": {
                      "type": "string",
                      "const": "lock"
                    },
                    "reason": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "op"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "op": {
                      "type": "string",
                      "const": "minimize"
                    },
                    "target": {
                      "default": "triggering_comment",
                      "type": "string",
                      "const": "triggering_comment"
                    },
                    "reason": {
                      "type": "string",
                      "enum": [
                        "spam",
                        "abuse",
                        "off_topic",
                        "outdated",
                        "duplicate",
                        "resolved",
                        "low_quality"
                      ]
                    }
                  },
                  "required": [
                    "op",
                    "reason"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "op": {
                      "type": "string",
                      "const": "convert_to_discussion"
                    },
                    "category": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "op",
                    "category"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "op": {
                      "type": "string",
                      "const": "assign"
                    },
                    "logins": {
                      "minItems": 1,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      }
                    }
                  },
                  "required": [
                    "op",
                    "logins"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "op": {
                      "type": "string",
                      "const": "request_review"
                    },
                    "logins": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "codeowners": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "op"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "op": {
                      "type": "string",
                      "const": "milestone"
                    },
                    "title": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "op",
                    "title"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "op": {
                      "type": "string",
                      "const": "project_field"
                    },
                    "project": {
                      "type": "string",
                      "minLength": 1
                    },
                    "field": {
                      "type": "string",
                      "minLength": 1
                    },
                    "value": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "op",
                    "project",
                    "field",
                    "value"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "op": {
                      "type": "string",
                      "const": "notify"
                    },
                    "channel": {
                      "type": "string",
                      "minLength": 1
                    },
                    "template": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "op",
                    "channel",
                    "template"
                  ],
                  "additionalProperties": false
                }
              ]
            }
          }
        },
        "required": [
          "afterDays",
          "then"
        ],
        "additionalProperties": false
      }
    },
    "plugins": {
      "default": [],
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    }
  },
  "required": [
    "version"
  ],
  "additionalProperties": false,
  "$defs": {
    "__schema0": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema0"
          }
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/$defs/__schema0"
          }
        }
      ]
    }
  }
}

MIT licensed.