Skip to content

Commit f759bb2

Browse files
update example configs to use v3 schema
1 parent 2d5e258 commit f759bb2

File tree

6 files changed

+30
-108
lines changed

6 files changed

+30
-108
lines changed

configs/auth.json

Lines changed: 6 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,13 @@
11
{
2-
"$schema": "../schemas/v2/index.json",
3-
"repos": [
4-
// Authenticate using a token directly in the config.
5-
// Private and public repositories will be included.
6-
{
7-
"type": "github",
8-
"token": "ghp_token1234",
9-
"orgs": [
10-
"my-org"
11-
]
12-
},
13-
{
14-
"type": "gitlab",
15-
"token": "glpat-1234",
16-
"groups": [
17-
"my-group"
18-
]
19-
},
20-
{
21-
"type": "gitea",
22-
"token": "gitea-token",
23-
"orgs": [
24-
"my-org"
25-
]
26-
},
27-
28-
// You can also store the token in a environment variable and then
29-
// references it from the config.
30-
{
2+
"$schema": "../schemas/v3/index.json",
3+
"connections": {
4+
"example-1": {
315
"type": "github",
326
"token": {
337
"env": "GITHUB_TOKEN_ENV_VAR"
348
}
359
},
36-
{
10+
"example-2": {
3711
"type": "gitlab",
3812
"token": {
3913
"env": "GITLAB_TOKEN_ENV_VAR"
@@ -42,7 +16,7 @@
4216
"my-group"
4317
]
4418
},
45-
{
19+
"example-3": {
4620
"type": "gitea",
4721
"token": {
4822
"env": "GITEA_TOKEN_ENV_VAR"
@@ -51,5 +25,5 @@
5125
"my-org"
5226
]
5327
}
54-
]
28+
}
5529
}

configs/basic.json

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
{
2-
"$schema": "../schemas/v2/index.json",
2+
"$schema": "../schemas/v3/index.json",
33
// Note: to include private repositories, you must provide an authentication token.
44
// See: configs/auth.json for a example.
5-
"repos": [
5+
"connections": {
66
// From GitHub, include:
77
// - all public repos owned by user `torvalds`
88
// - all public repos owned by organization `commai`
99
// - repo `sourcebot-dev/sourcebot`
10-
{
10+
"example-1": {
1111
"type": "github",
12-
"token": "my-token",
1312
"users": [
1413
"torvalds"
1514
],
@@ -24,9 +23,8 @@
2423
// - all public projects owned by user `brendan67`
2524
// - all public projects in group `my-group` and sub-group `sub-group`
2625
// - project `my-group/project1`
27-
{
26+
"example-2": {
2827
"type": "gitlab",
29-
"token": "my-token",
3028
"users": [
3129
"brendan67"
3230
],
@@ -42,9 +40,8 @@
4240
// - all public repos owned by user `my-user`
4341
// - all public repos owned by organization `my-org`
4442
// - repo `my-org/my-repo`
45-
{
43+
"example-3": {
4644
"type": "gitea",
47-
"token": "my-token",
4845
"users": [
4946
"my-user"
5047
],
@@ -54,20 +51,6 @@
5451
"repos": [
5552
"my-org/my-repo"
5653
]
57-
},
58-
// Index a local repository
59-
{
60-
"type": "local",
61-
"path": "/path/to/local/repo"
62-
},
63-
// Index all projects in a self-hosted GitLab instance
64-
// that are visible to the provided token.
65-
// Note: this does not work with gitlab.com
66-
{
67-
"type": "gitlab",
68-
"url": "https://gitlab.example.com",
69-
"token": "my-token",
70-
"all": true
7154
}
72-
]
55+
}
7356
}

configs/filter.json

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
{
2-
"$schema": "../schemas/v2/index.json",
3-
"repos": [
2+
"$schema": "../schemas/v3/index.json",
3+
"connections": {
44
// Include all repos in my-org, except:
55
// - repo1 & repo2
66
// - repos that are archived or forks
7-
{
7+
"example-1": {
88
"type": "github",
9-
"token": "my-token",
109
"orgs": [
1110
"my-org"
1211
],
@@ -25,9 +24,8 @@
2524
// Include all projects in my-group, except:
2625
// - project1 & project2
2726
// - projects that are archived or forks
28-
{
27+
"example-2": {
2928
"type": "gitlab",
30-
"token": "my-token",
3129
"groups": [
3230
"my-group"
3331
],
@@ -46,9 +44,8 @@
4644
// Include all repos in my-org, except:
4745
// - repo1 & repo2
4846
// - repos that are archived or forks
49-
{
47+
"example-3": {
5048
"type": "gitea",
51-
"token": "my-token",
5249
"orgs": [
5350
"my-org"
5451
],
@@ -66,7 +63,7 @@
6663
// Include all repos in my-org that have the topic
6764
// "TypeScript" and do not have a topic that starts
6865
// with "test-"
69-
{
66+
"example-4": {
7067
"type": "github",
7168
"orgs": [
7269
"my-org"
@@ -83,7 +80,7 @@
8380
// Include all repos in my-group that have the topic
8481
// "TypeScript" and do not have a topic that starts
8582
// with "test-"
86-
{
83+
"example-5": {
8784
"type": "gitlab",
8885
"groups": [
8986
"my-group"
@@ -97,5 +94,5 @@
9794
]
9895
}
9996
}
100-
]
97+
}
10198
}

configs/local-repo.json

Lines changed: 0 additions & 32 deletions
This file was deleted.

configs/multi-branch.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"$schema": "../schemas/v2/index.json",
3-
"repos": [
4-
{
2+
"$schema": "../schemas/v3/index.json",
3+
"connections": {
4+
"example-1": {
55
"type": "github",
66
"revisions": {
77
// Specify branches to index...
@@ -22,5 +22,5 @@
2222
"org/repob"
2323
]
2424
}
25-
]
25+
}
2626
}

configs/self-hosted.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
{
2-
"$schema": "../schemas/v2/index.json",
3-
"repos": [
4-
{
2+
"$schema": "../schemas/v3/index.json",
3+
"connections": {
4+
"example-1": {
55
"type": "github",
66
"url": "https://github.example.com",
77
"orgs": [
88
"my-org-name"
99
]
1010
},
11-
{
11+
"example-2": {
1212
"type": "gitlab",
1313
"url": "https://gitlab.example.com",
1414
"groups": [
1515
"my-group"
1616
]
1717
},
18-
{
18+
"example-3": {
1919
"type": "gitea",
2020
"url": "https://gitea.example.com",
2121
"orgs": [
2222
"my-org-name"
2323
]
2424
}
25-
]
25+
}
2626
}

0 commit comments

Comments
 (0)