Skip to content

Commit c8bbdd7

Browse files
wip on docs
1 parent 72cde87 commit c8bbdd7

File tree

2 files changed

+88
-7
lines changed

2 files changed

+88
-7
lines changed

docs/docs.json

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,25 @@
2929
"group": "Connecting your code",
3030
"pages": [
3131
"docs/connections/overview",
32-
"docs/connections/github",
33-
"docs/connections/gitlab",
34-
"docs/connections/bitbucket-cloud",
35-
"docs/connections/bitbucket-data-center",
36-
"docs/connections/gitea",
37-
"docs/connections/gerrit",
38-
"docs/connections/request-new"
32+
{
33+
"group": "Supported platforms",
34+
"pages": [
35+
"docs/connections/github",
36+
"docs/connections/gitlab",
37+
"docs/connections/bitbucket-cloud",
38+
"docs/connections/bitbucket-data-center",
39+
"docs/connections/gitea",
40+
"docs/connections/gerrit",
41+
"docs/connections/request-new"
42+
]
43+
}
3944
]
4045
},
4146
{
4247
"group": "More",
4348
"pages": [
4449
"docs/more/syntax-reference",
50+
"docs/more/multi-branch-indexing",
4551
"docs/more/roles-and-permissions"
4652
]
4753
}
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
---
2+
title: Searching multiple branches and tags
3+
sidebarTitle: Searching multiple branches
4+
---
5+
6+
By default, only the default branch of a repository is indexed and can be searched. Sourcebot can be configured to index additional branches (or tags) enabling multi-branch search. This is useful for scenarios such as:
7+
8+
- Searching across different releases
9+
- Searching through feature branches during development
10+
- Tracking changes across multiple maintenance branches simultaneously
11+
12+
## Configuration
13+
14+
<Warning>
15+
Multi-branch indexing is currently limited to 64 branches and tags. If this limitation impacts your use-case, please [open a discussion](https://github.com/sourcebot-dev/sourcebot/discussions/categories/support).
16+
</Warning>
17+
18+
Multi-branch indexing is configured on in the [connection](/docs/connections/overview) using the `revisions.branches` and `revisions.tags` arrays. Glob patterns are supported. For example:
19+
20+
```json
21+
{
22+
"$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json",
23+
"connections": {
24+
"my-connection": {
25+
"type": "github",
26+
// For each of the repositories defined in this connection...
27+
"repos": [
28+
"org/repo1",
29+
"org/repo2"
30+
],
31+
// ... index the default branch, as well as...
32+
"revisions": {
33+
// These branches (if they exist):
34+
"branches": [
35+
// Exact matches
36+
"dev",
37+
"staging",
38+
39+
// Glob patterns
40+
"feature/*" // Matches: feature/auth, feature/ui, etc.
41+
],
42+
43+
// These tags (if they exist):
44+
"tags": [
45+
// Exact matches
46+
"v4.0.0-dev",
47+
48+
// Glob patterns
49+
"v3.*.*", // Matches: v3.0.0, v3.0.1, etc.
50+
"rc-*" // Matches: rc-1, rc-2, etc.
51+
]
52+
}
53+
}
54+
}
55+
}
56+
```
57+
58+
For each repo defined in the connection, any branches or tags matching the patterns in `branches` and `tags` array will be indexed.
59+
60+
## Search syntax
61+
62+
todo
63+
64+
65+
## Platform support
66+
67+
| Platform | Multi-branch indexing support |
68+
|:----------|------------------------------|
69+
| GitHub ||
70+
| GitLab ||
71+
| Bitbucket Cloud ||
72+
| Bitbucket Data Center ||
73+
| Gitea ||
74+
| Gerrit ||
75+

0 commit comments

Comments
 (0)