diff --git a/configs/auth.json b/configs/auth.json index 14274eb9..cb08e583 100644 --- a/configs/auth.json +++ b/configs/auth.json @@ -1,39 +1,13 @@ { - "$schema": "../schemas/v2/index.json", - "repos": [ - // Authenticate using a token directly in the config. - // 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. - { + "$schema": "../schemas/v3/index.json", + "connections": { + "example-1": { "type": "github", "token": { "env": "GITHUB_TOKEN_ENV_VAR" } }, - { + "example-2": { "type": "gitlab", "token": { "env": "GITLAB_TOKEN_ENV_VAR" @@ -42,7 +16,7 @@ "my-group" ] }, - { + "example-3": { "type": "gitea", "token": { "env": "GITEA_TOKEN_ENV_VAR" @@ -51,5 +25,5 @@ "my-org" ] } - ] + } } \ No newline at end of file diff --git a/configs/basic.json b/configs/basic.json index b57de3a4..db23c4e0 100644 --- a/configs/basic.json +++ b/configs/basic.json @@ -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. // See: configs/auth.json for a example. - "repos": [ + "connections": { // From GitHub, include: // - all public repos owned by user `torvalds` // - all public repos owned by organization `commai` // - repo `sourcebot-dev/sourcebot` - { + "example-1": { "type": "github", - "token": "my-token", "users": [ "torvalds" ], @@ -24,9 +23,8 @@ // - all public projects owned by user `brendan67` // - all public projects in group `my-group` and sub-group `sub-group` // - project `my-group/project1` - { + "example-2": { "type": "gitlab", - "token": "my-token", "users": [ "brendan67" ], @@ -42,9 +40,8 @@ // - all public repos owned by user `my-user` // - all public repos owned by organization `my-org` // - repo `my-org/my-repo` - { + "example-3": { "type": "gitea", - "token": "my-token", "users": [ "my-user" ], @@ -54,20 +51,6 @@ "repos": [ "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 } - ] + } } \ No newline at end of file diff --git a/configs/filter.json b/configs/filter.json index 98e5881d..5a1154fa 100644 --- a/configs/filter.json +++ b/configs/filter.json @@ -1,12 +1,11 @@ { - "$schema": "../schemas/v2/index.json", - "repos": [ + "$schema": "../schemas/v3/index.json", + "connections": { // Include all repos in my-org, except: // - repo1 & repo2 // - repos that are archived or forks - { + "example-1": { "type": "github", - "token": "my-token", "orgs": [ "my-org" ], @@ -25,9 +24,8 @@ // Include all projects in my-group, except: // - project1 & project2 // - projects that are archived or forks - { + "example-2": { "type": "gitlab", - "token": "my-token", "groups": [ "my-group" ], @@ -46,9 +44,8 @@ // Include all repos in my-org, except: // - repo1 & repo2 // - repos that are archived or forks - { + "example-3": { "type": "gitea", - "token": "my-token", "orgs": [ "my-org" ], @@ -66,7 +63,7 @@ // Include all repos in my-org that have the topic // "TypeScript" and do not have a topic that starts // with "test-" - { + "example-4": { "type": "github", "orgs": [ "my-org" @@ -83,7 +80,7 @@ // Include all repos in my-group that have the topic // "TypeScript" and do not have a topic that starts // with "test-" - { + "example-5": { "type": "gitlab", "groups": [ "my-group" @@ -97,5 +94,5 @@ ] } } - ] + } } \ No newline at end of file diff --git a/configs/local-repo.json b/configs/local-repo.json deleted file mode 100644 index 8c1647d4..00000000 --- a/configs/local-repo.json +++ /dev/null @@ -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" - ] - } - } - ] -} \ No newline at end of file diff --git a/configs/multi-branch.json b/configs/multi-branch.json index 618acfa8..16e67410 100644 --- a/configs/multi-branch.json +++ b/configs/multi-branch.json @@ -1,7 +1,7 @@ { - "$schema": "../schemas/v2/index.json", - "repos": [ - { + "$schema": "../schemas/v3/index.json", + "connections": { + "example-1": { "type": "github", "revisions": { // Specify branches to index... @@ -22,5 +22,5 @@ "org/repob" ] } - ] + } } \ No newline at end of file diff --git a/configs/self-hosted.json b/configs/self-hosted.json index 96695d1f..3d0e7871 100644 --- a/configs/self-hosted.json +++ b/configs/self-hosted.json @@ -1,26 +1,26 @@ { - "$schema": "../schemas/v2/index.json", - "repos": [ - { + "$schema": "../schemas/v3/index.json", + "connections": { + "example-1": { "type": "github", "url": "https://github.example.com", "orgs": [ "my-org-name" ] }, - { + "example-2": { "type": "gitlab", "url": "https://gitlab.example.com", "groups": [ "my-group" ] }, - { + "example-3": { "type": "gitea", "url": "https://gitea.example.com", "orgs": [ "my-org-name" ] } - ] + } } \ No newline at end of file