Skip to content

Sourcebot v2.0.0

Compare
Choose a tag to compare
@brendan-kellam brendan-kellam released this 17 Oct 21:10
· 259 commits to main since this release

What's Changed

We've overhauled the config schema to make things more readable. Some examples:

// Single-line comments are now supported, as well as...
/*
    ...multi-line comments!
*/
{
    "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v2/index.json",
    "repos": [
        // For GitHub, you can include users, orgs, or individual repos
        {
            "type": "github",
            "users": [
                "torvalds"
            ],
            "orgs": [
                "commaai"
            ],
            "repos": [
                "sourcebot-dev/sourcebot"
            ]
        },
        // For GitLab, you can include users, groups (& sub-groups), or individual projects
        {
            "type": "gitlab",
            "users": [
                "my-user"
            ],
            "groups": [
                "my-group",
                "my-other-group/sub-group"
            ],
            "projects": [
                "my-group/project1"
            ]
        },
        // You can exclude repos with the `exclude` property
        {
            "type": "github",
            "orgs": [
                "my-org"
            ],
            "exclude": {
                "archived": true,
                "forks": true,
                "repos": [
                    "my-org/repo1",
                    "my-org/repo2"
                ]
            }
       },
       // You can authenticate with the `token` property
       {
            "type": "github",
            "token": "ghp_token1234",
            "orgs": [
                "my-private-org"
            ]
        },
        // You can also pass tokens as environment variables
        {
            "type": "github",
            "token": {
                "env": "GITHUB_TOKEN_ENV_VAR"
            },
            "orgs": [
                "my-private-org"
            ]
        },
        // Self-hosted instances can be used with the `url` property
        {
            "type": "gitlab",
            "url": "https://gitlab.example.com",
            "groups": [
                "my-group"
            ]
        }
    ]
}

For more examples, see the configs directory. You can also checkout the v2 schema here.

Full Changelog: v1.0.3...v2.0.0