sourcebot-dev / sourcebot

Blazingly fast code search 🏎️ Deployed as a single Docker image 📦 Search million+ lines of code in your GitHub, GitLab, and Gitea repositories 🪄 MIT licensed ✅
https://sourcebot.dev
MIT License
1.16k stars 37 forks source link

WIP: Add basic gerrit support #76

Open KonradStanski opened 1 week ago

KonradStanski commented 1 week ago

This commit adds support for gerrit repos. It will either fetch all repos, or the specified ones. Branch fetching is supported Tags are not yet supported Auth is not yet supported (not necessary for default gerrit setup) Need to add useage of gerritkit rest api npm module

DO NOT MERGE YET PLEASE SQUASH ON MERGE

KonradStanski commented 1 week ago

Should we add the yarn.lock file to gitignore?

KonradStanski commented 1 week ago

This works as is with public gerrit instance. Try:

{
    "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v2/index.json",
    "repos": [
        {
            "type": "gerrit",
            "url": "https://review.opendev.org",
            "limit": 5,
            "exclude": {
                "projects": [
                    "All-Users",
                    "All-Projects"
                ]
            },
            "revisions": {
                "branches": [
                    "refs/heads/v2.0",
                    "refs/heads/v2.1"
                ],
                "tags": [
                    "applier-v2.1.0"
                ]
            }
        }
    ]
}

Ignore tags, it's not implemented yet.

brendan-kellam commented 1 week ago

Should we add the yarn.lock file to gitignore?

No we want yarn.lock to be checked into source control. See here.