forked from sourcegraph/sourcegraph-public-snapshot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbitbucket_cloud.schema.json
More file actions
114 lines (114 loc) · 5.97 KB
/
bitbucket_cloud.schema.json
File metadata and controls
114 lines (114 loc) · 5.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "bitbucket_cloud.schema.json#",
"title": "BitbucketCloudConnection",
"description": "Configuration for a connection to Bitbucket Cloud.",
"allowComments": true,
"type": "object",
"additionalProperties": false,
"required": ["url", "username", "appPassword"],
"properties": {
"url": {
"description": "URL of Bitbucket Cloud, such as https://bitbucket.org. Generally, admin should not modify the value of this option because Bitbucket Cloud is a public hosting platform.",
"type": "string",
"not": {
"type": "string",
"pattern": "example\\.com"
},
"pattern": "^https?://",
"format": "uri",
"examples": ["https://bitbucket.org"]
},
"apiURL": {
"description": "The API URL of Bitbucket Cloud, such as https://api.bitbucket.org. Generally, admin should not modify the value of this option because Bitbucket Cloud is a public hosting platform.",
"type": "string",
"not": {
"type": "string",
"pattern": "example\\.com"
},
"pattern": "^https?://",
"format": "uri",
"examples": ["https://api.bitbucket.org"]
},
"rateLimit": {
"description": "Rate limit applied when making background API requests to Bitbucket Cloud.",
"title": "BitbucketCloudRateLimit",
"type": "object",
"required": ["enabled", "requestsPerHour"],
"properties": {
"enabled": {
"description": "true if rate limiting is enabled.",
"type": "boolean",
"default": true
},
"requestsPerHour": {
"description": "Requests per hour permitted. This is an average, calculated per second. Internally, the burst limit is set to 500, which implies that for a requests per hour limit as low as 1, users will continue to be able to send a maximum of 500 requests immediately, provided that the complexity cost of each request is 1.",
"type": "number",
"default": 7200,
"minimum": 0
}
},
"default": {
"enabled": true,
"requestsPerHour": 7200
}
},
"username": {
"description": "The username to use when authenticating to the Bitbucket Cloud. Also set the corresponding \"appPassword\" field.",
"type": "string"
},
"appPassword": {
"description": "The app password to use when authenticating to the Bitbucket Cloud. Also set the corresponding \"username\" field.",
"type": "string"
},
"gitURLType": {
"description": "The type of Git URLs to use for cloning and fetching Git repositories on this Bitbucket Cloud.\n\nIf \"http\", Sourcegraph will access Bitbucket Cloud repositories using Git URLs of the form https://bitbucket.org/myteam/myproject.git.\n\nIf \"ssh\", Sourcegraph will access Bitbucket Cloud repositories using Git URLs of the form [email protected]:myteam/myproject.git. See the documentation for how to provide SSH private keys and known_hosts: https://docs.sourcegraph.com/admin/repo/auth#repositories-that-need-http-s-or-ssh-authentication.",
"type": "string",
"enum": ["http", "ssh"],
"default": "http",
"examples": ["ssh"]
},
"repositoryPathPattern": {
"description": "The pattern used to generate the corresponding Sourcegraph repository name for a Bitbucket Cloud repository.\n\n - \"{host}\" is replaced with the Bitbucket Cloud URL's host (such as bitbucket.org), and \"{nameWithOwner}\" is replaced with the Bitbucket Cloud repository's \"owner/path\" (such as \"myorg/myrepo\").\n\nFor example, if your Bitbucket Cloud is https://bitbucket.org and your Sourcegraph is https://src.example.com, then a repositoryPathPattern of \"{host}/{nameWithOwner}\" would mean that a Bitbucket Cloud repository at https://bitbucket.org/alice/my-repo is available on Sourcegraph at https://src.example.com/bitbucket.org/alice/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.",
"type": "string",
"default": "{host}/{nameWithOwner}"
},
"teams": {
"description": "An array of team names identifying Bitbucket Cloud teams whose repositories should be mirrored on Sourcegraph.",
"type": "array",
"items": { "type": "string", "pattern": "^[\\w-]+$" },
"examples": [["name"], ["kubernetes", "golang", "facebook"]]
},
"exclude": {
"description": "A list of repositories to never mirror from Bitbucket Cloud. Takes precedence over \"teams\" configuration.\n\nSupports excluding by name ({\"name\": \"myorg/myrepo\"}) or by UUID ({\"uuid\": \"{fceb73c7-cef6-4abe-956d-e471281126bd}\"}).",
"type": "array",
"items": {
"type": "object",
"title": "ExcludedBitbucketCloudRepo",
"additionalProperties": false,
"anyOf": [{ "required": ["name"] }, { "required": ["uuid"] }, { "required": ["pattern"] }],
"properties": {
"name": {
"description": "The name of a Bitbucket Cloud repo (\"myorg/myrepo\") to exclude from mirroring.",
"type": "string",
"pattern": "^[\\w-]+/[\\w.-]+$"
},
"uuid": {
"description": "The UUID of a Bitbucket Cloud repo (as returned by the Bitbucket Cloud's API) to exclude from mirroring.",
"type": "string",
"pattern": "^\\{[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}\\}$"
},
"pattern": {
"description": "Regular expression which matches against the name of a Bitbucket Cloud repo.",
"type": "string",
"format": "regex"
}
}
},
"examples": [
[{ "name": "myorg/myrepo" }, { "uuid": "{fceb73c7-cef6-4abe-956d-e471281126bc}" }],
[{ "name": "myorg/myrepo" }, { "name": "myorg/myotherrepo" }, { "pattern": "^topsecretproject/.*" }]
]
}
}
}