Skip to content

Commit 7d5a85a

Browse files
committed
add docs
1 parent e9c5109 commit 7d5a85a

21 files changed

+345
-115
lines changed

docs/docs.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@
6868
"docs/connections/gitlab",
6969
"docs/connections/bitbucket-cloud",
7070
"docs/connections/bitbucket-data-center",
71+
"docs/connections/ado-cloud",
72+
"docs/connections/ado-server",
7173
"docs/connections/gitea",
7274
"docs/connections/gerrit",
7375
"docs/connections/generic-git-host",
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
---
2+
title: Linking code from Azure Devops Cloud
3+
sidebarTitle: Azure Devops Cloud
4+
icon: https://www.svgrepo.com/show/448307/azure-devops.svg
5+
---
6+
7+
import AzureDevopsSchema from '/snippets/schemas/v3/azuredevops.schema.mdx'
8+
9+
If you're not familiar with Sourcebot [connections](/docs/connections/overview), please read that overview first.
10+
11+
## Examples
12+
13+
<AccordionGroup>
14+
<Accordion title="Sync individual repos">
15+
```json
16+
{
17+
"type": "azuredevops",
18+
"repos": [
19+
"organizationName/projectName/repoName",
20+
"organizationName/projectName/repoName2
21+
]
22+
}
23+
```
24+
</Accordion>
25+
<Accordion title="Sync all repos in a organization">
26+
```json
27+
{
28+
"type": "azuredevops",
29+
"orgs": [
30+
"organizationName",
31+
"organizationName2
32+
]
33+
}
34+
```
35+
</Accordion>
36+
<Accordion title="Sync all repos in a project">
37+
```json
38+
{
39+
"type": "azuredevops",
40+
"projects": [
41+
"organizationName/projectName",
42+
"organizationName/projectName2"
43+
]
44+
}
45+
```
46+
</Accordion>
47+
<Accordion title="Exclude repos from syncing">
48+
```json
49+
{
50+
"type": "azuredevops",
51+
// Include all repos in my-org...
52+
"orgs": [
53+
"my-org"
54+
],
55+
// ...except:
56+
"exclude": {
57+
// repos that are disabled
58+
"disabled": true,
59+
// repos that match these glob patterns
60+
"repos": [
61+
"reposToExclude*"
62+
],
63+
// projects that match these glob patterns
64+
"projects": [
65+
"projectstoExclude*"
66+
]
67+
// repos less than the defined min OR larger than the defined max
68+
"size": {
69+
// repos that are less than 1MB (in bytes)...
70+
"min": 1048576,
71+
// or repos greater than 100MB (in bytes)
72+
"max": 104857600
73+
}
74+
}
75+
}
76+
```
77+
</Accordion>
78+
</AccordionGroup>
79+
80+
## Authenticating with Azure Devops Cloud
81+
82+
Azure Devops Cloud requires you to provide a PAT in order to index your repositories. To learn how to create PAT, check out the [Azure Devops docs](https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=Windows).
83+
Sourcebot needs the `Read` access for the `Code` scope in order to find and clone your repos.
84+
85+
Next, provide the access token via the `token` property, either as an environment variable or a secret:
86+
87+
<Tabs>
88+
<Tab title="Environment Variable">
89+
90+
1. Add the `token` property to your connection config:
91+
```json
92+
{
93+
"type": "azuredevops",
94+
"token": {
95+
// note: this env var can be named anything. It
96+
// doesn't need to be `ADO_TOKEN`.
97+
"env": "ADO_TOKEN"
98+
}
99+
// .. rest of config ..
100+
}
101+
```
102+
103+
2. Pass this environment variable each time you run Sourcebot:
104+
```bash
105+
docker run \
106+
-e ADO_TOKEN=<PAT> \
107+
/* additional args */ \
108+
ghcr.io/sourcebot-dev/sourcebot:latest
109+
```
110+
</Tab>
111+
112+
<Tab title="Secret">
113+
<Note>Secrets are only supported when [authentication](/docs/configuration/auth/overview) is enabled.</Note>
114+
115+
1. Navigate to **Secrets** in settings and create a new secret with your PAT:
116+
117+
![](/images/secrets_list.png)
118+
119+
2. Add the `token` property to your connection config:
120+
121+
```json
122+
{
123+
"type": "azuredevops",
124+
"token": {
125+
"secret": "mysecret"
126+
}
127+
// .. rest of config ..
128+
}
129+
```
130+
131+
</Tab>
132+
</Tabs>
133+
134+
## Schema reference
135+
136+
<Accordion title="Reference">
137+
[schemas/v3/azuredevops.json](https://github.com/sourcebot-dev/sourcebot/blob/main/schemas/v3/azuredevops.json)
138+
139+
<AzureDevopsSchema />
140+
141+
</Accordion>
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
---
2+
title: Linking code from Azure Devops Server
3+
sidebarTitle: Azure Devops Server
4+
icon: https://www.svgrepo.com/show/448307/azure-devops.svg
5+
---
6+
7+
import AzureDevopsSchema from '/snippets/schemas/v3/azuredevops.schema.mdx'
8+
9+
If you're not familiar with Sourcebot [connections](/docs/connections/overview), please read that overview first.
10+
11+
## Examples
12+
13+
<AccordionGroup>
14+
<Accordion title="Sync individual repos">
15+
```json
16+
{
17+
"type": "azuredevops",
18+
"repos": [
19+
"organizationName/projectName/repoName",
20+
"organizationName/projectName/repoName2
21+
]
22+
}
23+
```
24+
</Accordion>
25+
<Accordion title="Sync all repos in a collection">
26+
```json
27+
{
28+
"type": "azuredevops",
29+
"orgs": [
30+
"collectionName",
31+
"collectionName2"
32+
]
33+
}
34+
```
35+
</Accordion>
36+
<Accordion title="Sync all repos in a project">
37+
```json
38+
{
39+
"type": "azuredevops",
40+
"projects": [
41+
"collectionName/projectName",
42+
"collectionName/projectName2"
43+
]
44+
}
45+
```
46+
</Accordion>
47+
<Accordion title="Exclude repos from syncing">
48+
```json
49+
{
50+
"type": "azuredevops",
51+
// Include all repos in my-org...
52+
"orgs": [
53+
"my-org"
54+
],
55+
// ...except:
56+
"exclude": {
57+
// repos that are disabled
58+
"disabled": true,
59+
// repos that match these glob patterns
60+
"repos": [
61+
"reposToExclude*"
62+
],
63+
// projects that match these glob patterns
64+
"projects": [
65+
"projectstoExclude*"
66+
]
67+
// repos less than the defined min OR larger than the defined max
68+
"size": {
69+
// repos that are less than 1MB (in bytes)...
70+
"min": 1048576,
71+
// or repos greater than 100MB (in bytes)
72+
"max": 104857600
73+
}
74+
}
75+
}
76+
```
77+
</Accordion>
78+
</AccordionGroup>
79+
80+
## Authenticating with Azure Devops Server
81+
82+
Azure Devops Server requires you to provide a PAT in order to index your repositories. To learn how to create PAT, check out the [Azure Devops docs](https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=Windows).
83+
Sourcebot needs the `Read` access for the `Code` scope in order to find and clone your repos.
84+
85+
Next, provide the access token via the `token` property, either as an environment variable or a secret:
86+
87+
<Tabs>
88+
<Tab title="Environment Variable">
89+
90+
1. Add the `token` property to your connection config:
91+
```json
92+
{
93+
"type": "azuredevops",
94+
"token": {
95+
// note: this env var can be named anything. It
96+
// doesn't need to be `ADO_TOKEN`.
97+
"env": "ADO_TOKEN"
98+
}
99+
// .. rest of config ..
100+
}
101+
```
102+
103+
2. Pass this environment variable each time you run Sourcebot:
104+
```bash
105+
docker run \
106+
-e ADO_TOKEN=<PAT> \
107+
/* additional args */ \
108+
ghcr.io/sourcebot-dev/sourcebot:latest
109+
```
110+
</Tab>
111+
112+
<Tab title="Secret">
113+
<Note>Secrets are only supported when [authentication](/docs/configuration/auth/overview) is enabled.</Note>
114+
115+
1. Navigate to **Secrets** in settings and create a new secret with your PAT:
116+
117+
![](/images/secrets_list.png)
118+
119+
2. Add the `token` property to your connection config:
120+
121+
```json
122+
{
123+
"type": "azuredevops",
124+
"token": {
125+
"secret": "mysecret"
126+
}
127+
// .. rest of config ..
128+
}
129+
```
130+
131+
</Tab>
132+
</Tabs>
133+
134+
## Schema reference
135+
136+
<Accordion title="Reference">
137+
[schemas/v3/azuredevops.json](https://github.com/sourcebot-dev/sourcebot/blob/main/schemas/v3/azuredevops.json)
138+
139+
<AzureDevopsSchema />
140+
141+
</Accordion>

docs/docs/connections/gitea.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ Next, provide the access token via the `token` property, either as an environmen
8585

8686
<Tabs>
8787
<Tab title="Environment Variable">
88-
<Note>Environment variables are only supported in a [declarative config](/docs/configuration/declarative-config) and cannot be used in the web UI.</Note>
8988

9089
1. Add the `token` property to your connection config:
9190
```json

docs/docs/connections/github.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ Next, provide the access token via the `token` property, either as an environmen
132132

133133
<Tabs>
134134
<Tab title="Environment Variable">
135-
<Note>Environment variables are only supported in a [declarative config](/docs/configuration/declarative-config) and cannot be used in the web UI.</Note>
136135

137136
1. Add the `token` property to your connection config:
138137
```json

docs/docs/connections/gitlab.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ Next, provide the PAT via the `token` property, either as an environment variabl
120120

121121
<Tabs>
122122
<Tab title="Environment Variable">
123-
<Note>Environment variables are only supported in a [declarative config](/docs/configuration/declarative-config) and cannot be used in the web UI.</Note>
124123

125124
1. Add the `token` property to your connection config:
126125
```json

docs/images/ado.svg

Lines changed: 3 additions & 0 deletions
Loading

docs/snippets/bitbucket-app-password.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<Tabs>
22
<Tab title="Environment Variable">
3-
<Note>Environment variables are only supported in a [declarative config](/docs/configuration/declarative-config) and cannot be used in the web UI.</Note>
43

54
1. Add the `token` and `user` (username associated with the app password you created) properties to your connection config:
65
```json

docs/snippets/bitbucket-token.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<Tabs>
22
<Tab title="Environment Variable">
3-
<Note>Environment variables are only supported in a [declarative config](/docs/configuration/declarative-config) and cannot be used in the web UI.</Note>
43

54
1. Add the `token` property to your connection config:
65
```json

docs/snippets/platform-support.mdx

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,43 @@
33
<Card horizontal title="GitLab" icon="gitlab" href="/docs/connections/gitlab" />
44
<Card horizontal title="Bitbucket Cloud" icon="bitbucket" href="/docs/connections/bitbucket-cloud" />
55
<Card horizontal title="Bitbucket Data Center" icon="bitbucket" href="/docs/connections/bitbucket-data-center" />
6+
{/* Mintlify has a bug where linking to a file for the logo renders it with a white background, so we have to embed it directly */}
7+
<Card
8+
horizontal
9+
title="Azure Dev Ops Cloud"
10+
href="/docs/connections/azure-devops"
11+
icon={
12+
<svg
13+
xmlns="http://www.w3.org/2000/svg"
14+
fill="none"
15+
viewBox="0 0 16 16"
16+
className="w-6 h-6 text-white"
17+
>
18+
<path
19+
fill="currentColor"
20+
d="M15 3.622v8.512L11.5 15l-5.425-1.975v1.958L3.004 10.97l8.951.7V4.005L15 3.622zm-2.984.428L6.994 1v2.001L2.382 4.356 1 6.13v4.029l1.978.873V5.869l9.038-1.818z"
21+
/>
22+
</svg>
23+
}
24+
/>
25+
<Card
26+
horizontal
27+
title="Azure Dev Ops Server"
28+
href="/docs/connections/azure-devops"
29+
icon={
30+
<svg
31+
xmlns="http://www.w3.org/2000/svg"
32+
fill="none"
33+
viewBox="0 0 16 16"
34+
className="w-6 h-6 text-white"
35+
>
36+
<path
37+
fill="currentColor"
38+
d="M15 3.622v8.512L11.5 15l-5.425-1.975v1.958L3.004 10.97l8.951.7V4.005L15 3.622zm-2.984.428L6.994 1v2.001L2.382 4.356 1 6.13v4.029l1.978.873V5.869l9.038-1.818z"
39+
/>
40+
</svg>
41+
}
42+
/>
643
<Card horizontal title="Gitea" icon="mug-tea" href="/docs/connections/gitea" />
744
<Card horizontal title="Gerrit" icon="crow" href="/docs/connections/gerrit" />
845
<Card horizontal title="Other Git hosts" icon="git-alt" href="/docs/connections/generic-git-host" />

0 commit comments

Comments
 (0)