97 lines
2.9 KiB
JSON
97 lines
2.9 KiB
JSON
|
|
{
|
||
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||
|
|
"title": "josh-sync configuration",
|
||
|
|
"description": "Configuration for bidirectional monorepo ↔ subrepo sync via josh-proxy",
|
||
|
|
"type": "object",
|
||
|
|
"required": ["josh", "targets", "bot"],
|
||
|
|
"properties": {
|
||
|
|
"josh": {
|
||
|
|
"type": "object",
|
||
|
|
"required": ["proxy_url", "monorepo_path"],
|
||
|
|
"properties": {
|
||
|
|
"proxy_url": {
|
||
|
|
"type": "string",
|
||
|
|
"description": "Josh-proxy URL (no trailing slash)",
|
||
|
|
"pattern": "^https?://"
|
||
|
|
},
|
||
|
|
"monorepo_path": {
|
||
|
|
"type": "string",
|
||
|
|
"description": "Repo path as josh sees it (org/repo)"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"targets": {
|
||
|
|
"type": "array",
|
||
|
|
"minItems": 1,
|
||
|
|
"items": {
|
||
|
|
"type": "object",
|
||
|
|
"required": ["name", "subfolder", "subrepo_url", "branches"],
|
||
|
|
"properties": {
|
||
|
|
"name": {
|
||
|
|
"type": "string",
|
||
|
|
"description": "Unique target identifier"
|
||
|
|
},
|
||
|
|
"subfolder": {
|
||
|
|
"type": "string",
|
||
|
|
"description": "Monorepo subfolder path"
|
||
|
|
},
|
||
|
|
"josh_filter": {
|
||
|
|
"type": "string",
|
||
|
|
"description": "Josh filter expression (auto-derived from subfolder if omitted)",
|
||
|
|
"pattern": "^:"
|
||
|
|
},
|
||
|
|
"subrepo_url": {
|
||
|
|
"type": "string",
|
||
|
|
"description": "External subrepo git URL (HTTPS or SSH)"
|
||
|
|
},
|
||
|
|
"subrepo_auth": {
|
||
|
|
"type": "string",
|
||
|
|
"enum": ["https", "ssh"],
|
||
|
|
"default": "https",
|
||
|
|
"description": "Auth method for subrepo"
|
||
|
|
},
|
||
|
|
"subrepo_token_var": {
|
||
|
|
"type": "string",
|
||
|
|
"description": "Env var name for per-target HTTPS token (default: SUBREPO_TOKEN)"
|
||
|
|
},
|
||
|
|
"subrepo_ssh_key_var": {
|
||
|
|
"type": "string",
|
||
|
|
"description": "Env var name for per-target SSH key (default: SUBREPO_SSH_KEY)"
|
||
|
|
},
|
||
|
|
"branches": {
|
||
|
|
"type": "object",
|
||
|
|
"description": "Branch mapping: mono_branch → subrepo_branch",
|
||
|
|
"additionalProperties": {
|
||
|
|
"type": "string"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"forward_only": {
|
||
|
|
"type": "array",
|
||
|
|
"items": { "type": "string" },
|
||
|
|
"default": [],
|
||
|
|
"description": "Branches that only sync mono → subrepo (never reverse)"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"bot": {
|
||
|
|
"type": "object",
|
||
|
|
"required": ["name", "email", "trailer"],
|
||
|
|
"properties": {
|
||
|
|
"name": {
|
||
|
|
"type": "string",
|
||
|
|
"description": "Git commit author name for sync commits"
|
||
|
|
},
|
||
|
|
"email": {
|
||
|
|
"type": "string",
|
||
|
|
"description": "Git commit author email"
|
||
|
|
},
|
||
|
|
"trailer": {
|
||
|
|
"type": "string",
|
||
|
|
"description": "Git trailer key for loop prevention"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|