update example configs to use v3 schema

This commit is contained in:
bkellam 2025-04-01 10:26:46 -07:00
parent 2d5e2584ca
commit f759bb2bb6
6 changed files with 30 additions and 108 deletions

View file

@ -1,39 +1,13 @@
{ {
"$schema": "../schemas/v2/index.json", "$schema": "../schemas/v3/index.json",
"repos": [ "connections": {
// Authenticate using a token directly in the config. "example-1": {
// Private and public repositories will be included.
{
"type": "github",
"token": "ghp_token1234",
"orgs": [
"my-org"
]
},
{
"type": "gitlab",
"token": "glpat-1234",
"groups": [
"my-group"
]
},
{
"type": "gitea",
"token": "gitea-token",
"orgs": [
"my-org"
]
},
// You can also store the token in a environment variable and then
// references it from the config.
{
"type": "github", "type": "github",
"token": { "token": {
"env": "GITHUB_TOKEN_ENV_VAR" "env": "GITHUB_TOKEN_ENV_VAR"
} }
}, },
{ "example-2": {
"type": "gitlab", "type": "gitlab",
"token": { "token": {
"env": "GITLAB_TOKEN_ENV_VAR" "env": "GITLAB_TOKEN_ENV_VAR"
@ -42,7 +16,7 @@
"my-group" "my-group"
] ]
}, },
{ "example-3": {
"type": "gitea", "type": "gitea",
"token": { "token": {
"env": "GITEA_TOKEN_ENV_VAR" "env": "GITEA_TOKEN_ENV_VAR"
@ -51,5 +25,5 @@
"my-org" "my-org"
] ]
} }
] }
} }

View file

@ -1,15 +1,14 @@
{ {
"$schema": "../schemas/v2/index.json", "$schema": "../schemas/v3/index.json",
// Note: to include private repositories, you must provide an authentication token. // Note: to include private repositories, you must provide an authentication token.
// See: configs/auth.json for a example. // See: configs/auth.json for a example.
"repos": [ "connections": {
// From GitHub, include: // From GitHub, include:
// - all public repos owned by user `torvalds` // - all public repos owned by user `torvalds`
// - all public repos owned by organization `commai` // - all public repos owned by organization `commai`
// - repo `sourcebot-dev/sourcebot` // - repo `sourcebot-dev/sourcebot`
{ "example-1": {
"type": "github", "type": "github",
"token": "my-token",
"users": [ "users": [
"torvalds" "torvalds"
], ],
@ -24,9 +23,8 @@
// - all public projects owned by user `brendan67` // - all public projects owned by user `brendan67`
// - all public projects in group `my-group` and sub-group `sub-group` // - all public projects in group `my-group` and sub-group `sub-group`
// - project `my-group/project1` // - project `my-group/project1`
{ "example-2": {
"type": "gitlab", "type": "gitlab",
"token": "my-token",
"users": [ "users": [
"brendan67" "brendan67"
], ],
@ -42,9 +40,8 @@
// - all public repos owned by user `my-user` // - all public repos owned by user `my-user`
// - all public repos owned by organization `my-org` // - all public repos owned by organization `my-org`
// - repo `my-org/my-repo` // - repo `my-org/my-repo`
{ "example-3": {
"type": "gitea", "type": "gitea",
"token": "my-token",
"users": [ "users": [
"my-user" "my-user"
], ],
@ -54,20 +51,6 @@
"repos": [ "repos": [
"my-org/my-repo" "my-org/my-repo"
] ]
},
// Index a local repository
{
"type": "local",
"path": "/path/to/local/repo"
},
// Index all projects in a self-hosted GitLab instance
// that are visible to the provided token.
// Note: this does not work with gitlab.com
{
"type": "gitlab",
"url": "https://gitlab.example.com",
"token": "my-token",
"all": true
} }
] }
} }

View file

@ -1,12 +1,11 @@
{ {
"$schema": "../schemas/v2/index.json", "$schema": "../schemas/v3/index.json",
"repos": [ "connections": {
// Include all repos in my-org, except: // Include all repos in my-org, except:
// - repo1 & repo2 // - repo1 & repo2
// - repos that are archived or forks // - repos that are archived or forks
{ "example-1": {
"type": "github", "type": "github",
"token": "my-token",
"orgs": [ "orgs": [
"my-org" "my-org"
], ],
@ -25,9 +24,8 @@
// Include all projects in my-group, except: // Include all projects in my-group, except:
// - project1 & project2 // - project1 & project2
// - projects that are archived or forks // - projects that are archived or forks
{ "example-2": {
"type": "gitlab", "type": "gitlab",
"token": "my-token",
"groups": [ "groups": [
"my-group" "my-group"
], ],
@ -46,9 +44,8 @@
// Include all repos in my-org, except: // Include all repos in my-org, except:
// - repo1 & repo2 // - repo1 & repo2
// - repos that are archived or forks // - repos that are archived or forks
{ "example-3": {
"type": "gitea", "type": "gitea",
"token": "my-token",
"orgs": [ "orgs": [
"my-org" "my-org"
], ],
@ -66,7 +63,7 @@
// Include all repos in my-org that have the topic // Include all repos in my-org that have the topic
// "TypeScript" and do not have a topic that starts // "TypeScript" and do not have a topic that starts
// with "test-" // with "test-"
{ "example-4": {
"type": "github", "type": "github",
"orgs": [ "orgs": [
"my-org" "my-org"
@ -83,7 +80,7 @@
// Include all repos in my-group that have the topic // Include all repos in my-group that have the topic
// "TypeScript" and do not have a topic that starts // "TypeScript" and do not have a topic that starts
// with "test-" // with "test-"
{ "example-5": {
"type": "gitlab", "type": "gitlab",
"groups": [ "groups": [
"my-group" "my-group"
@ -97,5 +94,5 @@
] ]
} }
} }
] }
} }

View file

@ -1,32 +0,0 @@
{
"$schema": "../schemas/v2/index.json",
"repos": [
{
"type": "local",
"path": "/path/to/local/repo"
},
// Relative paths are relative to the config file
{
"type": "local",
"path": "../../relative/path/to/local/repo"
},
// File watcher can be disabled (enabled by default)
{
"type": "local",
"path": "/path/to/local/repo",
"watch": false
},
// Exclude paths can be specified
{
"type": "local",
"path": "/path/to/local/repo",
"exclude": {
"paths": [
".git",
"node_modules",
"dist"
]
}
}
]
}

View file

@ -1,7 +1,7 @@
{ {
"$schema": "../schemas/v2/index.json", "$schema": "../schemas/v3/index.json",
"repos": [ "connections": {
{ "example-1": {
"type": "github", "type": "github",
"revisions": { "revisions": {
// Specify branches to index... // Specify branches to index...
@ -22,5 +22,5 @@
"org/repob" "org/repob"
] ]
} }
] }
} }

View file

@ -1,26 +1,26 @@
{ {
"$schema": "../schemas/v2/index.json", "$schema": "../schemas/v3/index.json",
"repos": [ "connections": {
{ "example-1": {
"type": "github", "type": "github",
"url": "https://github.example.com", "url": "https://github.example.com",
"orgs": [ "orgs": [
"my-org-name" "my-org-name"
] ]
}, },
{ "example-2": {
"type": "gitlab", "type": "gitlab",
"url": "https://gitlab.example.com", "url": "https://gitlab.example.com",
"groups": [ "groups": [
"my-group" "my-group"
] ]
}, },
{ "example-3": {
"type": "gitea", "type": "gitea",
"url": "https://gitea.example.com", "url": "https://gitea.example.com",
"orgs": [ "orgs": [
"my-org-name" "my-org-name"
] ]
} }
] }
} }