{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/Geocodio/yak/main/schemas/config.schema.json", "title": "Yak repository config (.yak/config.yml)", "type": "object", "additionalProperties": false, "properties": { "version": { "const": 1, "description": "The file format version. Always 1." }, "description": { "type": [ "string", "null" ], "maxLength": 1000, "description": "A short description of what this repository is, shown to Yak as context." }, "destroy_after_hours": { "type": "integer", "minimum": 1, "description": "Hours a stopped thread sandbox is kept before it is destroyed. Capped by the server (default 168)." }, "refresh": { "type": "object", "description": "Maps a file glob to the command that runs when a matching file changes.", "additionalProperties": { "type": "string" } }, "ci": { "enum": [ "github_actions", "drone", "none" ], "description": "The CI system Yak reads build results from." }, "walkthrough": { "type": "object", "description": "Settings for video walkthroughs.", "additionalProperties": false, "properties": { "public_site_url": { "type": [ "string", "null" ], "format": "uri", "maxLength": 255, "description": "The public origin shown in the mock URL bar of walkthrough videos." } } }, "pull_requests": { "type": "object", "description": "Settings for the pull requests Yak opens.", "additionalProperties": false, "properties": { "large_change_lines": { "type": "integer", "description": "The number of changed lines above which a pull request counts as large.", "minimum": 1 } } }, "co_owner_gate": { "type": "object", "description": "The gate that asks code owners to approve changes to protected paths.", "additionalProperties": false, "properties": { "mode": { "enum": [ "off", "enforce" ], "description": "Whether the gate is off or enforced." } } }, "data": { "type": "object", "description": "A dataset Yak fetches once from the S3-compatible store and clones into every sandbox and preview of this repository.", "additionalProperties": false, "required": [ "name", "prefix", "version_key", "mount_path" ], "properties": { "name": { "type": "string", "maxLength": 40, "pattern": "^[a-z0-9-]+$", "description": "The dataset name: lowercase letters, digits and dashes." }, "prefix": { "type": "string", "maxLength": 500, "pattern": "^(?!/)(?!.*\\.\\.)[A-Za-z0-9_./-]+$", "description": "The object key prefix in the bucket. No leading slash and no '..'. The dataset for version V is under //." }, "version_key": { "type": "string", "maxLength": 500, "pattern": "^(?!/)(?!.*\\.\\.)[A-Za-z0-9_./-]+$", "description": "The object whose first line is the current version string." }, "mount_path": { "type": "string", "maxLength": 200, "pattern": "^/(?!.*\\.\\.)[A-Za-z0-9_./-]+$", "not": { "enum": [ "/", "/workspace", "/results" ] }, "description": "Where the dataset is mounted in the sandbox: absolute, no '..', not / or /workspace or /results." }, "size_gb": { "type": "integer", "minimum": 1, "description": "An optional size hint in GB shown to admins. The enforced cap is set by an admin." } } }, "review": { "type": "object", "description": "Settings for pull request review.", "additionalProperties": false, "properties": { "enabled": { "type": "boolean", "description": "Whether Yak reviews pull requests in this repository." }, "deep": { "type": "object", "description": "Settings for the deep review pass.", "additionalProperties": false, "properties": { "enabled": { "type": "boolean", "description": "Whether Yak runs a second, deep review pass on pull requests in this repository." } } }, "comment_style": { "type": "string", "enum": ["labels", "plain"], "description": "How Yak words its pull request comments: labels (a bracketed label first) or plain (the severity in words, then the sentence)." }, "exclude_paths": { "type": "array", "description": "Path globs Yak leaves out of reviews.", "maxItems": 100, "items": { "type": "string", "maxLength": 500, "pattern": "^[A-Za-z0-9_./*?\\-]+$" } }, "approval": { "type": "object", "description": "Ignored. The approval level is set in Yak's dashboard.", "deprecated": true, "additionalProperties": false, "properties": { "mode": { "enum": [ "off", "shadow", "enforce" ], "description": "Whether approval is off, recorded without acting (shadow), or enforced." }, "allowed_paths": { "type": "array", "description": "Path globs a change must stay within to be approved.", "maxItems": 100, "items": { "type": "string", "maxLength": 500, "pattern": "^[A-Za-z0-9_./*?\\-]+$" } }, "blocked_paths": { "type": "array", "description": "Path globs that always need a human, even when everything else passes.", "maxItems": 100, "items": { "type": "string", "maxLength": 500, "pattern": "^[A-Za-z0-9_./*?\\-]+$" } }, "required_checks": { "type": "array", "description": "Check names that must pass before Yak approves.", "maxItems": 50, "uniqueItems": true, "items": { "type": "string", "maxLength": 255 } }, "max_files": { "type": "integer", "description": "The most files a change may touch and still be approved.", "minimum": 1, "maximum": 100 }, "max_lines": { "type": "integer", "description": "The most changed lines a change may have and still be approved.", "minimum": 1, "maximum": 5000 }, "max_risk_score": { "type": "integer", "description": "The highest risk score a change may have and still be approved.", "minimum": 0, "maximum": 30 }, "min_confidence": { "type": "integer", "description": "The lowest review confidence, as a percentage, at which Yak approves.", "minimum": 80, "maximum": 100 } }, "required": [ "mode" ] } } } }, "required": [ "version" ] }