|
19 | 19 | "ZoektConfig": { |
20 | 20 | "anyOf": [ |
21 | 21 | { |
22 | | - "$ref": "#/definitions/GitHubConfig" |
| 22 | + "type": "object", |
| 23 | + "properties": { |
| 24 | + "Type": { |
| 25 | + "const": "github" |
| 26 | + }, |
| 27 | + "GitHubUrl": { |
| 28 | + "type": "string", |
| 29 | + "description": "GitHub Enterprise url. If not set github.com will be used as the host." |
| 30 | + }, |
| 31 | + "GitHubUser": { |
| 32 | + "type": "string", |
| 33 | + "description": "The GitHub user to mirror" |
| 34 | + }, |
| 35 | + "GitHubOrg": { |
| 36 | + "type": "string", |
| 37 | + "description": "The GitHub organization to mirror" |
| 38 | + }, |
| 39 | + "Name": { |
| 40 | + "type": "string", |
| 41 | + "description": "Only clone repos whose name matches the given regexp.", |
| 42 | + "format": "regexp", |
| 43 | + "default": "^(foo|bar)$" |
| 44 | + }, |
| 45 | + "Exclude": { |
| 46 | + "type": "string", |
| 47 | + "description": "Don't mirror repos whose names match this regexp.", |
| 48 | + "format": "regexp", |
| 49 | + "default": "^(fizz|buzz)$" |
| 50 | + }, |
| 51 | + "CredentialPath": { |
| 52 | + "type": "string", |
| 53 | + "description": "Path to a file containing a GitHub access token.", |
| 54 | + "default": "~/.github-token" |
| 55 | + }, |
| 56 | + "Topics": { |
| 57 | + "type": "array", |
| 58 | + "items": { |
| 59 | + "type": "string" |
| 60 | + }, |
| 61 | + "description": "Only mirror repos that have one of the given topics" |
| 62 | + }, |
| 63 | + "ExcludeTopics": { |
| 64 | + "type": "array", |
| 65 | + "items": { |
| 66 | + "type": "string" |
| 67 | + }, |
| 68 | + "description": "Don't mirror repos that have one of the given topics" |
| 69 | + }, |
| 70 | + "NoArchived": { |
| 71 | + "type": "boolean", |
| 72 | + "description": "Mirror repos that are _not_ archived", |
| 73 | + "default": false |
| 74 | + }, |
| 75 | + "IncludeForks": { |
| 76 | + "type": "boolean", |
| 77 | + "description": "Also mirror forks", |
| 78 | + "default": false |
| 79 | + } |
| 80 | + }, |
| 81 | + "required": [ |
| 82 | + "Type" |
| 83 | + ], |
| 84 | + "additionalProperties": false |
23 | 85 | }, |
24 | 86 | { |
25 | | - "$ref": "#/definitions/GitLabConfig" |
| 87 | + "type": "object", |
| 88 | + "properties": { |
| 89 | + "Type": { |
| 90 | + "const": "gitlab" |
| 91 | + }, |
| 92 | + "GitLabURL": { |
| 93 | + "type": "string", |
| 94 | + "description": "The GitLab API url.", |
| 95 | + "default": "https://gitlab.com/api/v4/" |
| 96 | + }, |
| 97 | + "Name": { |
| 98 | + "type": "string", |
| 99 | + "description": "Only clone repos whose name matches the given regexp.", |
| 100 | + "format": "regexp", |
| 101 | + "default": "^(foo|bar)$" |
| 102 | + }, |
| 103 | + "Exclude": { |
| 104 | + "type": "string", |
| 105 | + "description": "Don't mirror repos whose names match this regexp.", |
| 106 | + "format": "regexp", |
| 107 | + "default": "^(fizz|buzz)$" |
| 108 | + }, |
| 109 | + "OnlyPublic": { |
| 110 | + "type": "boolean", |
| 111 | + "description": "Only mirror public repos", |
| 112 | + "default": false |
| 113 | + }, |
| 114 | + "CredentialPath": { |
| 115 | + "type": "string", |
| 116 | + "description": "Path to a file containing a GitLab access token.", |
| 117 | + "default": "~/.gitlab-token" |
| 118 | + } |
| 119 | + }, |
| 120 | + "required": [ |
| 121 | + "Type" |
| 122 | + ], |
| 123 | + "additionalProperties": false |
26 | 124 | } |
27 | 125 | ] |
28 | 126 | }, |
|
45 | 143 | "description": "The GitHub organization to mirror" |
46 | 144 | }, |
47 | 145 | "Name": { |
48 | | - "$ref": "#/definitions/RepoNameRegexIncludeFilter" |
| 146 | + "type": "string", |
| 147 | + "description": "Only clone repos whose name matches the given regexp.", |
| 148 | + "format": "regexp", |
| 149 | + "default": "^(foo|bar)$" |
49 | 150 | }, |
50 | 151 | "Exclude": { |
51 | | - "$ref": "#/definitions/RepoNameRegexExcludeFilter" |
| 152 | + "type": "string", |
| 153 | + "description": "Don't mirror repos whose names match this regexp.", |
| 154 | + "format": "regexp", |
| 155 | + "default": "^(fizz|buzz)$" |
52 | 156 | }, |
53 | 157 | "CredentialPath": { |
54 | 158 | "type": "string", |
|
97 | 201 | "default": "https://gitlab.com/api/v4/" |
98 | 202 | }, |
99 | 203 | "Name": { |
100 | | - "$ref": "#/definitions/RepoNameRegexIncludeFilter" |
| 204 | + "type": "string", |
| 205 | + "description": "Only clone repos whose name matches the given regexp.", |
| 206 | + "format": "regexp", |
| 207 | + "default": "^(foo|bar)$" |
101 | 208 | }, |
102 | 209 | "Exclude": { |
103 | | - "$ref": "#/definitions/RepoNameRegexExcludeFilter" |
| 210 | + "type": "string", |
| 211 | + "description": "Don't mirror repos whose names match this regexp.", |
| 212 | + "format": "regexp", |
| 213 | + "default": "^(fizz|buzz)$" |
104 | 214 | }, |
105 | 215 | "OnlyPublic": { |
106 | 216 | "type": "boolean", |
|
126 | 236 | "Configs": { |
127 | 237 | "type": "array", |
128 | 238 | "items": { |
129 | | - "$ref": "#/definitions/ZoektConfig" |
| 239 | + "anyOf": [ |
| 240 | + { |
| 241 | + "type": "object", |
| 242 | + "properties": { |
| 243 | + "Type": { |
| 244 | + "const": "github" |
| 245 | + }, |
| 246 | + "GitHubUrl": { |
| 247 | + "type": "string", |
| 248 | + "description": "GitHub Enterprise url. If not set github.com will be used as the host." |
| 249 | + }, |
| 250 | + "GitHubUser": { |
| 251 | + "type": "string", |
| 252 | + "description": "The GitHub user to mirror" |
| 253 | + }, |
| 254 | + "GitHubOrg": { |
| 255 | + "type": "string", |
| 256 | + "description": "The GitHub organization to mirror" |
| 257 | + }, |
| 258 | + "Name": { |
| 259 | + "type": "string", |
| 260 | + "description": "Only clone repos whose name matches the given regexp.", |
| 261 | + "format": "regexp", |
| 262 | + "default": "^(foo|bar)$" |
| 263 | + }, |
| 264 | + "Exclude": { |
| 265 | + "type": "string", |
| 266 | + "description": "Don't mirror repos whose names match this regexp.", |
| 267 | + "format": "regexp", |
| 268 | + "default": "^(fizz|buzz)$" |
| 269 | + }, |
| 270 | + "CredentialPath": { |
| 271 | + "type": "string", |
| 272 | + "description": "Path to a file containing a GitHub access token.", |
| 273 | + "default": "~/.github-token" |
| 274 | + }, |
| 275 | + "Topics": { |
| 276 | + "type": "array", |
| 277 | + "items": { |
| 278 | + "type": "string" |
| 279 | + }, |
| 280 | + "description": "Only mirror repos that have one of the given topics" |
| 281 | + }, |
| 282 | + "ExcludeTopics": { |
| 283 | + "type": "array", |
| 284 | + "items": { |
| 285 | + "type": "string" |
| 286 | + }, |
| 287 | + "description": "Don't mirror repos that have one of the given topics" |
| 288 | + }, |
| 289 | + "NoArchived": { |
| 290 | + "type": "boolean", |
| 291 | + "description": "Mirror repos that are _not_ archived", |
| 292 | + "default": false |
| 293 | + }, |
| 294 | + "IncludeForks": { |
| 295 | + "type": "boolean", |
| 296 | + "description": "Also mirror forks", |
| 297 | + "default": false |
| 298 | + } |
| 299 | + }, |
| 300 | + "required": [ |
| 301 | + "Type" |
| 302 | + ], |
| 303 | + "additionalProperties": false |
| 304 | + }, |
| 305 | + { |
| 306 | + "type": "object", |
| 307 | + "properties": { |
| 308 | + "Type": { |
| 309 | + "const": "gitlab" |
| 310 | + }, |
| 311 | + "GitLabURL": { |
| 312 | + "type": "string", |
| 313 | + "description": "The GitLab API url.", |
| 314 | + "default": "https://gitlab.com/api/v4/" |
| 315 | + }, |
| 316 | + "Name": { |
| 317 | + "type": "string", |
| 318 | + "description": "Only clone repos whose name matches the given regexp.", |
| 319 | + "format": "regexp", |
| 320 | + "default": "^(foo|bar)$" |
| 321 | + }, |
| 322 | + "Exclude": { |
| 323 | + "type": "string", |
| 324 | + "description": "Don't mirror repos whose names match this regexp.", |
| 325 | + "format": "regexp", |
| 326 | + "default": "^(fizz|buzz)$" |
| 327 | + }, |
| 328 | + "OnlyPublic": { |
| 329 | + "type": "boolean", |
| 330 | + "description": "Only mirror public repos", |
| 331 | + "default": false |
| 332 | + }, |
| 333 | + "CredentialPath": { |
| 334 | + "type": "string", |
| 335 | + "description": "Path to a file containing a GitLab access token.", |
| 336 | + "default": "~/.gitlab-token" |
| 337 | + } |
| 338 | + }, |
| 339 | + "required": [ |
| 340 | + "Type" |
| 341 | + ], |
| 342 | + "additionalProperties": false |
| 343 | + } |
| 344 | + ] |
130 | 345 | } |
131 | 346 | } |
132 | 347 | }, |
|
0 commit comments