From c0ecdccf41b5ae669c1e9fba7bd42c51cd2a8983 Mon Sep 17 00:00:00 2001 From: bkellam Date: Wed, 4 Sep 2024 13:01:43 -0700 Subject: [PATCH] Add zoekt-mirror json schema --- configs/config.json | 18 ++++---- schemas/zoekt-mirror.json | 90 +++++++++++++++++++++++++++++++++++++++ vendor/zoekt | 2 +- 3 files changed, 100 insertions(+), 10 deletions(-) create mode 100644 schemas/zoekt-mirror.json diff --git a/configs/config.json b/configs/config.json index e686f93c..b39e9279 100644 --- a/configs/config.json +++ b/configs/config.json @@ -1,9 +1,9 @@ -[ - { - "GithubOrg": "TaqlaAI", - "NoArchived": true - }, - { - "GithubOrg": "basetenlabs" - } -] \ No newline at end of file +{ + "$schema": "../schemas/zoekt-mirror.json", + "Configs": [ + { + "Type": "github", + "GitHubUser": "TaqlaAI" + } + ] +} \ No newline at end of file diff --git a/schemas/zoekt-mirror.json b/schemas/zoekt-mirror.json new file mode 100644 index 00000000..d85efb5a --- /dev/null +++ b/schemas/zoekt-mirror.json @@ -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 +} \ No newline at end of file diff --git a/vendor/zoekt b/vendor/zoekt index b0fd0b52..cab02224 160000 --- a/vendor/zoekt +++ b/vendor/zoekt @@ -1 +1 @@ -Subproject commit b0fd0b52e8c6d01b5f13ba283602f291ac34b95a +Subproject commit cab022245653c711f31d1fb0993a7741b11c648a