Skip to content

Commit 2aec3b0

Browse files
committed
Update admin/code_hosts/other_external_service.schema.json schema for v
1 parent f6d959a commit 2aec3b0

File tree

1 file changed

+93
-39
lines changed

1 file changed

+93
-39
lines changed

docs/admin/code_hosts/other.mdx

Lines changed: 93 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -69,47 +69,101 @@ Repositories must be listed individually:
6969
### admin/code_hosts/other_external_service.schema.json
7070

7171
{/* SCHEMA_SYNC_START: admin/code_hosts/other_external_service.schema.json */}
72-
{/* WARNING: This section is auto-generated during releases. Do not edit manually. */}
73-
{/* Last updated: 2025-07-10T00:07:35Z via sourcegraph/[email protected] */}
7472
```json
7573
{
76-
// A list of repositories to never mirror by name after applying repositoryPathPattern. Supports excluding by exact name ({"name": "myrepo"}) or regular expression ({"pattern": ".*secret.*"}).
77-
// Other example values:
78-
// - [
79-
// {
80-
// "name": "myrepo"
81-
// },
82-
// {
83-
// "pattern": ".*secret.*"
84-
// }
85-
// ]
86-
"exclude": null,
87-
88-
// SSH cipher to use when cloning via SSH. Must be a valid choice from `ssh -Q cipher`.
89-
"gitSSHCipher": null,
90-
91-
// SSH keys to use when cloning Git repo.
92-
"gitSSHCredential": null,
93-
94-
// Whether or not these repositories should be marked as public on Sourcegraph.com. Defaults to false.
95-
"makeReposPublicOnDotCom": false,
96-
97-
// REQUIRED:
98-
"repos": null,
99-
100-
// The pattern used to generate the corresponding Sourcegraph repository name for the repositories. In the pattern, the variable "{base}" is replaced with the Git clone base URL host and path, and "{repo}" is replaced with the repository path taken from the `repos` field.
101-
// For example, if your Git clone base URL is https://git.example.com/repos and `repos` contains the value "my/repo", then a repositoryPathPattern of "{base}/{repo}" would mean that a repository at https://git.example.com/repos/my/repo is available on Sourcegraph at https://sourcegraph.example.com/git.example.com/repos/my/repo.
102-
// It is important that the Sourcegraph repository name generated with this pattern be unique to this code host. If different code hosts generate repository names that collide, Sourcegraph's behavior is undefined.
103-
// Note: These patterns are ignored if using src-expose / src-serve.
104-
// Other example values:
105-
// - "pretty-host-name/{repo}"
106-
"repositoryPathPattern": "{base}/{repo}",
107-
108-
// Other example values:
109-
// - "https://github.com/?access_token=secret"
110-
// - "ssh://[email protected]:2333/"
111-
// - "git://host.xz:2333/"
112-
"url": null
74+
"$schema": "http://json-schema.org/draft-07/schema#",
75+
"$id": "other_external_service.schema.json#",
76+
"title": "OtherExternalServiceConnection",
77+
"description": "Configuration for a Connection to Git repositories for which an external service integration isn't yet available.",
78+
"allowComments": true,
79+
"type": "object",
80+
"additionalProperties": false,
81+
"required": ["repos"],
82+
"properties": {
83+
"url": {
84+
"title": "Git clone base URL",
85+
"type": "string",
86+
"format": "uri",
87+
"pattern": "^(git|ssh|https?)://",
88+
"not": {
89+
"type": "string",
90+
"pattern": "example\\.com"
91+
},
92+
"examples": ["https://github.com/?access_token=secret", "ssh://[email protected]:2333/", "git://host.xz:2333/"],
93+
"!go": {
94+
"typeName": "NormalizedURL"
95+
}
96+
},
97+
"repos": {
98+
"title": "List of repository clone URLs to be discovered.",
99+
"type": "array",
100+
"items": {
101+
"type": "string",
102+
"minLength": 1,
103+
"format": "uri-reference",
104+
"examples": ["path/to/my/repo", "path/to/my/repo.git/"]
105+
}
106+
},
107+
"repositoryPathPattern": {
108+
"description": "The pattern used to generate the corresponding Sourcegraph repository name for the repositories. In the pattern, the variable \"{base}\" is replaced with the Git clone base URL host and path, and \"{repo}\" is replaced with the repository path taken from the `repos` field.\n\nFor example, if your Git clone base URL is https://git.example.com/repos and `repos` contains the value \"my/repo\", then a repositoryPathPattern of \"{base}/{repo}\" would mean that a repository at https://git.example.com/repos/my/repo is available on Sourcegraph at https://sourcegraph.example.com/git.example.com/repos/my/repo.\n\nIt is important that the Sourcegraph repository name generated with this pattern be unique to this code host. If different code hosts generate repository names that collide, Sourcegraph's behavior is undefined.\n\nNote: These patterns are ignored if using src-expose / src-serve.",
109+
"type": "string",
110+
"default": "{base}/{repo}",
111+
"examples": ["pretty-host-name/{repo}"]
112+
},
113+
"exclude": {
114+
"description": "A list of repositories to never mirror by name after applying repositoryPathPattern. Supports excluding by exact name ({\"name\": \"myrepo\"}) or regular expression ({\"pattern\": \".*secret.*\"}).",
115+
"type": "array",
116+
"minItems": 1,
117+
"items": {
118+
"type": "object",
119+
"title": "ExcludedOtherRepo",
120+
"additionalProperties": false,
121+
"anyOf": [
122+
{
123+
"required": ["name"]
124+
},
125+
{
126+
"required": ["pattern"]
127+
}
128+
],
129+
"properties": {
130+
"name": {
131+
"description": "The name of a Other repo (\"my-repo\") to exclude from mirroring.",
132+
"type": "string",
133+
"minLength": 1
134+
},
135+
"pattern": {
136+
"description": "Regular expression which matches against the name of a Other repo to exclude from mirroring.",
137+
"type": "string",
138+
"format": "regex"
139+
}
140+
}
141+
},
142+
"examples": [
143+
[
144+
{
145+
"name": "myrepo"
146+
},
147+
{
148+
"pattern": ".*secret.*"
149+
}
150+
]
151+
]
152+
},
153+
"makeReposPublicOnDotCom": {
154+
"description": "Whether or not these repositories should be marked as public on Sourcegraph.com. Defaults to false.",
155+
"type": "boolean",
156+
"default": false
157+
},
158+
"gitSSHCredential": {
159+
"description": "SSH keys to use when cloning Git repo.",
160+
"$ref": "git.schema.json#/definitions/gitSSHCredential"
161+
},
162+
"gitSSHCipher": {
163+
"description": "SSH cipher to use when cloning via SSH. Must be a valid choice from `ssh -Q cipher`.",
164+
"$ref": "git.schema.json#/definitions/gitSSHCipher"
165+
}
166+
}
113167
}
114168
```
115169
{/* SCHEMA_SYNC_END: admin/code_hosts/other_external_service.schema.json */}

0 commit comments

Comments
 (0)