Add zoekt-mirror json schema

This commit is contained in:
bkellam 2024-09-04 13:01:43 -07:00
parent c64b457cbc
commit c0ecdccf41
3 changed files with 100 additions and 10 deletions

View file

@ -1,9 +1,9 @@
[
{
"$schema": "../schemas/zoekt-mirror.json",
"Configs": [
{
"GithubOrg": "TaqlaAI",
"NoArchived": true
},
{
"GithubOrg": "basetenlabs"
"Type": "github",
"GitHubUser": "TaqlaAI"
}
]
]
}

90
schemas/zoekt-mirror.json Normal file
View file

@ -0,0 +1,90 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"definitions": {
"ZoektConfig": {
"anyOf": [
{
"$ref": "#/definitions/GitHubConfig"
}
]
},
"GitHubConfig": {
"type": "object",
"properties": {
"Type": {
"const": "github"
},
"GitHubUrl": {
"type": "string",
"description": "GitHub Enterprise url. If not set github.com will be used as the host."
},
"GitHubUser": {
"type": "string",
"description": "The GitHub user to mirror"
},
"GitHubOrg": {
"type": "string",
"description": "The GitHub organization to mirror"
},
"Name": {
"type": "string",
"description": "Only clone repos whose name matches the given regexp.",
"format": "regexp"
},
"Exclude": {
"type": "string",
"description": "Don't mirror repos whose names match this regexp.",
"format": "regexp"
},
"CredentialPath": {
"type": "string",
"description": "Path to a file containing a GitHub access token."
},
"Topics": {
"type": "array",
"items": {
"type": "string"
},
"description": "Only mirror repos that have one of the given topics"
},
"ExcludeTopics": {
"type": "array",
"items": {
"type": "string"
},
"description": "Don't mirror repos that have one of the given topics"
},
"NoArchived": {
"type": "boolean",
"description": "Mirror repos that are _not_ archived",
"default": false
},
"IncludeForks": {
"type": "boolean",
"description": "Also mirror forks",
"default": false
}
},
"required": [
"Type"
],
"additionalProperties": false
}
},
"properties": {
"$schema": {
"type": "string"
},
"Configs": {
"type": "array",
"items": {
"$ref": "#/definitions/ZoektConfig"
}
}
},
"required": [
"Configs"
],
"additionalProperties": false
}

2
vendor/zoekt vendored

@ -1 +1 @@
Subproject commit b0fd0b52e8c6d01b5f13ba283602f291ac34b95a
Subproject commit cab022245653c711f31d1fb0993a7741b11c648a