From f2d4321ae37f463208ee201c1049dd0f49b8cb83 Mon Sep 17 00:00:00 2001 From: Hugo Gu Date: Tue, 16 Dec 2025 16:43:12 +0800 Subject: [PATCH] fix(#206): Respect host setting in environment variable and fix gitlab clone issue. --- CHANGELOG.md | 1 + packages/backend/src/repoCompileUtils.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5af68290..51866112 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fixed issue where parenthesis in query params were not being encoded, resulting in a poor experience when embedding links in Markdown. [#674](https://github.com/sourcebot-dev/sourcebot/pull/674) +- Gitlab clone respects host protocol setting in environment variable. [#676](https://github.com/sourcebot-dev/sourcebot/pull/676) ## [4.10.3] - 2025-12-12 diff --git a/packages/backend/src/repoCompileUtils.ts b/packages/backend/src/repoCompileUtils.ts index 5b2c0349..39ba1347 100644 --- a/packages/backend/src/repoCompileUtils.ts +++ b/packages/backend/src/repoCompileUtils.ts @@ -123,6 +123,7 @@ export const compileGitlabConfig = async ( const repos = gitlabRepos.map((project) => { const projectUrl = `${hostUrl}/${project.path_with_namespace}`; const cloneUrl = new URL(project.http_url_to_repo); + cloneUrl.protocol = new URL(hostUrl).protocol; const isFork = project.forked_from_project !== undefined; const isPublic = project.visibility === 'public'; const repoDisplayName = project.path_with_namespace;