Skip to content

Commit f90b2c0

Browse files
committed
Update admin/code_hosts/bitbucket_server.schema.json schema for v6.5.1211
1 parent 2676003 commit f90b2c0

File tree

1 file changed

+48
-27
lines changed

1 file changed

+48
-27
lines changed

docs/admin/code_hosts/bitbucket_server.mdx

Lines changed: 48 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -209,21 +209,30 @@ Bitbucket Server / Bitbucket Data Center connections support the following confi
209209

210210
{/* SCHEMA_SYNC_START: admin/code_hosts/bitbucket_server.schema.json */}
211211
{/* WARNING: This section is auto-generated during releases. Do not edit manually. */}
212-
{/* Last updated: Manual setup - will be automated via sourcegraph/sourcegraph releases */}
212+
{/* Last updated: 2025-07-01T23:25:33Z via sourcegraph/sourcegraph@v6.5.1211 */}
213213
```json
214+
// Authentication alternatives: token OR password
215+
214216
{
215217
// If non-null, enforces Bitbucket Server / Bitbucket Data Center repository permissions.
216-
"authorization": null,
218+
"authorization": {
219+
"identityProvider": {
220+
"type": null
221+
},
222+
"oauth": {
223+
"consumerKey": null,
224+
"signingKey": null
225+
},
226+
"oauth2": false
227+
},
217228

218229
// TLS certificate of the Bitbucket Server / Bitbucket Data Center instance. This is only necessary if the certificate is self-signed or signed by an internal CA. To get the certificate run `openssl s_client -connect HOST:443 -showcerts < /dev/null 2> /dev/null | openssl x509 -outform PEM`. To escape the value into a JSON string, you may want to use a tool like https://json-escape-text.now.sh.
219-
"certificate": null,
220230
// Other example values:
221231
// - "-----BEGIN CERTIFICATE-----\n..."
232+
"certificate": null,
222233

223234
// A list of repositories to never mirror from this Bitbucket Server / Bitbucket Data Center instance. Takes precedence over "repos" and "repositoryQuery".
224-
//
225235
// Supports excluding by name ({"name": "projectKey/repositorySlug"}) or by ID ({"id": 42}).
226-
"exclude": null,
227236
// Other example values:
228237
// - [
229238
// {
@@ -247,29 +256,43 @@ Bitbucket Server / Bitbucket Data Center connections support the following confi
247256
// "pattern": "^topsecretproject/.*"
248257
// }
249258
// ]
259+
"exclude": null,
250260

251261
// Whether or not personal repositories should be excluded or not. When true, Sourcegraph will ignore personal repositories it may have access to. See https://sourcegraph.com/docs/integration/bitbucket_server#excluding-personal-repositories for more information.
252262
"excludePersonalRepositories": false,
253263

264+
// SSH cipher to use when cloning via SSH. Must be a valid choice from `ssh -Q cipher`.
265+
"gitSSHCipher": null,
266+
267+
// SSH keys to use when cloning Git repo.
268+
"gitSSHCredential": null,
269+
254270
// The type of Git URLs to use for cloning and fetching Git repositories on this Bitbucket Server / Bitbucket Data Center instance.
255-
//
256271
// If "http", Sourcegraph will access Bitbucket Server / Bitbucket Data Center repositories using Git URLs of the form http(s)://bitbucket.example.com/scm/myproject/myrepo.git (using https: if the Bitbucket Server / Bitbucket Data Center instance uses HTTPS).
257-
//
258-
// If "ssh", Sourcegraph will access Bitbucket Server / Bitbucket Data Center repositories using Git URLs of the form ssh://[email protected]/myproject/myrepo.git. See the documentation for how to provide SSH private keys and known_hosts: https://sourcegraph.com/docs/admin/repo/auth#repositories-that-need-http-s-or-ssh-authentication.
259-
"gitURLType": "http",
272+
// If "ssh", Sourcegraph will access Bitbucket Server / Bitbucket Data Center repositories using Git URLs of the form ssh://[email protected]/myproject/myrepo.git. See the documentation for how to provide SSH private keys and known_hosts: https://sourcegraph.com/docs/admin/repo/auth.
273+
// Valid options: "http", "ssh"
260274
// Other example values:
261275
// - "ssh"
276+
"gitURLType": "http",
262277

263278
// Deprecated and ignored field which will be removed entirely in the next release. BitBucket repositories can no longer be enabled or disabled explicitly.
264279
"initialRepositoryEnablement": false,
265280

281+
// The maximum number of repos that will be deleted per sync. A value of 0 or less indicates no maximum.
282+
"maxDeletions": 0,
283+
266284
// The password to use when authenticating to the Bitbucket Server / Bitbucket Data Center instance. Also set the corresponding "username" field.
267-
//
268285
// For Bitbucket Server / Bitbucket Data Center instances that support personal access tokens (Bitbucket Server / Bitbucket Data Center version 5.5 and newer), it is recommended to provide a token instead (in the "token" field).
269286
"password": null,
270287

271288
// Configuration for Bitbucket Server / Bitbucket Data Center Sourcegraph plugin
272-
"plugin": null,
289+
"plugin": {
290+
"permissions": "disabled",
291+
"webhooks": {
292+
"disableSync": false,
293+
"secret": null
294+
}
295+
},
273296

274297
// An array of project key strings that defines a collection of repositories related to their associated project keys
275298
"projectKeys": null,
@@ -281,57 +304,55 @@ Bitbucket Server / Bitbucket Data Center connections support the following confi
281304
},
282305

283306
// An array of repository "projectKey/repositorySlug" strings specifying repositories to mirror on Sourcegraph.
284-
"repos": null,
285307
// Other example values:
286308
// - [
287309
// "myproject/myrepo",
288310
// "myproject/myotherrepo",
289311
// "~USER/theirrepo"
290312
// ]
313+
"repos": null,
291314

292315
// The pattern used to generate the corresponding Sourcegraph repository name for a Bitbucket Server / Bitbucket Data Center repository.
293-
//
294-
// - "{host}" is replaced with the Bitbucket Server / Bitbucket Data Center URL's host (such as bitbucket.example.com)
295-
// - "{projectKey}" is replaced with the Bitbucket repository's parent project key (such as "PRJ")
296-
// - "{repositorySlug}" is replaced with the Bitbucket repository's slug key (such as "my-repo").
297-
//
316+
// - "{host}" is replaced with the Bitbucket Server / Bitbucket Data Center URL's host (such as bitbucket.example.com)
317+
// - "{projectKey}" is replaced with the Bitbucket repository's parent project key (such as "PRJ")
318+
// - "{repositorySlug}" is replaced with the Bitbucket repository's slug key (such as "my-repo").
298319
// For example, if your Bitbucket Server / Bitbucket Data Center is https://bitbucket.example.com and your Sourcegraph is https://src.example.com, then a repositoryPathPattern of "{host}/{projectKey}/{repositorySlug}" would mean that a Bitbucket Server / Bitbucket Data Center repository at https://bitbucket.example.com/projects/PRJ/repos/my-repo is available on Sourcegraph at https://src.example.com/bitbucket.example.com/PRJ/my-repo.
299-
//
300320
// 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.
301-
"repositoryPathPattern": "{host}/{projectKey}/{repositorySlug}",
302321
// Other example values:
303322
// - "{projectKey}/{repositorySlug}"
323+
"repositoryPathPattern": "{host}/{projectKey}/{repositorySlug}",
304324

305325
// An array of strings specifying which repositories to mirror on Sourcegraph. Each string is a URL query string with parameters that filter the list of returned repos. Examples: "?name=my-repo&projectname=PROJECT&visibility=private".
306-
//
307326
// The special string "none" can be used as the only element to disable this feature. Repositories matched by multiple query strings are only imported once. Here's the official Bitbucket Server / Bitbucket Data Center documentation about which query string parameters are valid: https://docs.atlassian.com/bitbucket-server/rest/6.1.2/bitbucket-rest.html#idp355
308-
"repositoryQuery": [
309-
"none"
310-
],
311327
// Other example values:
312328
// - [
313329
// "?name=my-repo\u0026projectname=PROJECT\u0026visibility=private"
314330
// ]
331+
"repositoryQuery": [
332+
"none"
333+
],
315334

316335
// A Bitbucket Server / Bitbucket Data Center personal access token with Read permissions. When using batch changes, the token needs Write permissions. Create one at https://[your-bitbucket-hostname]/plugins/servlet/access-tokens/add. Also set the corresponding "username" field.
317-
//
318336
// For Bitbucket Server / Bitbucket Data Center instances that don't support personal access tokens (Bitbucket Server / Bitbucket Data Center version 5.4 and older), specify user-password credentials in the "username" and "password" fields.
319337
"token": null,
320338

339+
// REQUIRED:
321340
// URL of a Bitbucket Server / Bitbucket Data Center instance, such as https://bitbucket.example.com.
322-
"url": null,
323341
// Other example values:
324342
// - "https://bitbucket.example.com"
343+
"url": null,
325344

345+
// REQUIRED:
326346
// The username to use when authenticating to the Bitbucket Server / Bitbucket Data Center instance. Also set the corresponding "token" or "password" field.
327347
"username": null,
328348

329349
// DEPRECATED: Switch to "plugin.webhooks"
330-
"webhooks": null
350+
"webhooks": {
351+
"secret": null
352+
}
331353
}
332354
```
333355
{/* SCHEMA_SYNC_END: admin/code_hosts/bitbucket_server.schema.json */}
334-
335356
## Configuration Notes
336357

337358
Bitbucket Server/Data Center connections provide comprehensive configuration options for enterprise environments:

0 commit comments

Comments
 (0)