Skip to content

Gerrit sync - #104

Merged
brendan-kellam merged 5 commits into
sourcebot-dev:mainfrom
KonradStanski:gerrit-sync
Dec 3, 2024
Merged

brendan-kellam merged 5 commits into
sourcebot-dev:mainfrom
KonradStanski:gerrit-sync

Conversation

@KonradStanski

Copy link
Copy Markdown
Contributor

This commit adds support for gerrit repo indexing.
It supports globs for both including and excluding repos.
It does not support branches or tags (as these are going to be reworked by brendan in the future.
It does not support auth yet (I'd need to spin up my own gerrit instance to test this out) - I can add this later hopefully.
Example URLs for experimentation:
// https://chromium-review.googlesource.com
// https://review.opendev.org
// https://android-review.googlesource.com

Sample config:

{
   "$schema": "./schemas/v2/index.json",
   "repos": [
      {
         "type": "gerrit",
         "url": "https://gerrit-review.googlesource.com/",
         "projects": [
            "apps/**",
            "gerrit**",
            // "modules/**",
            "zuul/**"
         ],
         "exclude": {
            "projects": [
               "gerrit-**"
            ]
         }
      }
   ]
}

This adds basic support for gerrit repo code host syncing. Gerrit uses
gitiles plugin for code browsing (in most cases).
It may be usefull to allow users to provide their own web code-browsing
url templates in the future.
Comment thread schemas/v2/index.json Outdated
Comment thread packages/backend/src/utils.ts Outdated
Comment thread packages/backend/src/gerrit.ts Outdated
brendan-kellam
brendan-kellam previously approved these changes Dec 2, 2024

@brendan-kellam brendan-kellam left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉🎉

@brendan-kellam
brendan-kellam merged commit b452fd2 into sourcebot-dev:main Dec 3, 2024
@brendan-kellam brendan-kellam mentioned this pull request Dec 3, 2024
@KonradStanski

Copy link
Copy Markdown
Contributor Author

https://gerrit.wikimedia.org/
this is another example of a publicly available gerrit

@hashar

hashar commented Dec 10, 2024

Copy link
Copy Markdown

https://gerrit.wikimedia.org/ this is another example of a publicly available gerrit

Hi, I am working for Wikimedia and the current maintainer of that Gerrit instance. Thank you for having added support for Gerrit 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants