2024-09-04 20:01:43 +00:00
{
"$schema" : "http://json-schema.org/draft-07/schema#" ,
"type" : "object" ,
"definitions" : {
2024-09-04 20:55:47 +00:00
"RepoNameRegexIncludeFilter" : {
"type" : "string" ,
"description" : "Only clone repos whose name matches the given regexp." ,
"format" : "regexp"
} ,
"RepoNameRegexExcludeFilter" : {
"type" : "string" ,
"description" : "Don't mirror repos whose names match this regexp." ,
"format" : "regexp"
} ,
2024-09-04 20:01:43 +00:00
"ZoektConfig" : {
"anyOf" : [
{
"$ref" : "#/definitions/GitHubConfig"
2024-09-04 20:55:47 +00:00
} ,
{
"$ref" : "#/definitions/GitLabConfig"
2024-09-20 01:08:40 +00:00
} ,
{
"$ref" : "#/definitions/BitbucketConfig"
2024-09-04 20:01:43 +00:00
}
]
} ,
"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" : {
2024-09-04 20:55:47 +00:00
"$ref" : "#/definitions/RepoNameRegexIncludeFilter"
2024-09-04 20:01:43 +00:00
} ,
"Exclude" : {
2024-09-04 20:55:47 +00:00
"$ref" : "#/definitions/RepoNameRegexExcludeFilter"
2024-09-04 20:01:43 +00:00
} ,
"CredentialPath" : {
"type" : "string" ,
2024-09-04 20:55:47 +00:00
"description" : "Path to a file containing a GitHub access token." ,
"default" : "~/.github-token"
2024-09-04 20:01:43 +00:00
} ,
"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
2024-09-04 20:55:47 +00:00
} ,
"GitLabConfig" : {
"type" : "object" ,
"properties" : {
"Type" : {
"const" : "gitlab"
} ,
"GitLabURL" : {
"type" : "string" ,
"description" : "The GitLab API url." ,
"default" : "https://gitlab.com/api/v4/"
} ,
"Name" : {
"$ref" : "#/definitions/RepoNameRegexIncludeFilter"
} ,
"Exclude" : {
"$ref" : "#/definitions/RepoNameRegexExcludeFilter"
} ,
"OnlyPublic" : {
"type" : "boolean" ,
"description" : "Only mirror public repos" ,
"default" : false
} ,
"CredentialPath" : {
"type" : "string" ,
"description" : "Path to a file containing a GitLab access token." ,
"default" : "~/.gitlab-token"
}
} ,
"required" : [
"Type" ,
"GitLabURL"
] ,
"additionalProperties" : false
2024-09-20 01:08:40 +00:00
} ,
"BitbucketConfig" : {
"type" : "object" ,
"properties" : {
"Type" : {
"const" : "bitbucket"
} ,
"BitBucketServerURL" : {
"type" : "string" ,
"description" : "BitBucket Server url"
} ,
"BitBucketServerProject" : {
"type" : "string" ,
"description" : "project to mirror"
} ,
"DisableTLS" : {
"type" : "boolean" ,
"description" : "Disable TLS verification" ,
"default" : false
} ,
"ProjectType" : {
"type" : "string" ,
"description" : "Only clone repos whose type matches the given string. Type can be either NORMAl or PERSONAL. Clones projects of both types if not set." ,
"enum" : [ "NORMAL" , "PERSONAL" ]
} ,
"Name" : {
"$ref" : "#/definitions/RepoNameRegexIncludeFilter"
} ,
"Exclude" : {
"$ref" : "#/definitions/RepoNameRegexExcludeFilter"
} ,
"CredentialPath" : {
"type" : "string" ,
"description" : "Path to a file containing a Bitbucket access token." ,
2024-09-20 02:02:42 +00:00
"default" : ".bitbucket-credentials"
2024-09-20 01:08:40 +00:00
}
} ,
"required" : [
"Type" ,
"BitBucketServerURL"
] ,
"additionalProperties" : false
2024-09-04 20:01:43 +00:00
}
} ,
"properties" : {
"$schema" : {
"type" : "string"
} ,
"Configs" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/ZoektConfig"
}
}
} ,
"required" : [
"Configs"
] ,
"additionalProperties" : false
}