You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With a self-hosted GitLab it is possible to have a url like https://api.mygitlab.com for services to use tokens and a url like https://mygitlab.com for users to hit.
Users are not allowed to authenticate to the API url.
Services are not allowed to authenticate to the base url.
So when clicking urls to goto repos in Sourcebot, GitLab gives could not authenticate errors.
Proposal:
Add an optional config for gitlab provider of webUrl to match the name in the DB.
@claude open a PR that adds an optional webUrl field to the GitLab config schema. The webUrl field should be used to derive the projectUrl in repoCompileUtils.ts. Minimize the amount of comments that you add.
Add webUrl to the GitLab connection JSON schema (schemas/v3/gitlab.json)
Regenerate schema types (hand-applied, see note below)
Use webUrl to derive projectUrl in repoCompileUtils.ts
Update CHANGELOG
Commit & push
Summary
Added an optional webUrl field to the GitLab connection config. When set, it's used to build repository links (projectUrl → repo webUrl and zoekt.web-url) in packages/backend/src/repoCompileUtils.ts, while url continues to be used for API calls, avatars, and clone URLs. It defaults to the value of url when omitted, so existing configs are unaffected.
This resolves the case where a self-hosted GitLab serves the API from one host (e.g. https://api.mygitlab.com) and the web UI from another (e.g. https://mygitlab.com).
Files changed:
schemas/v3/gitlab.json — added the webUrl property.
packages/backend/src/repoCompileUtils.ts — derive projectUrl from webUrl.
Generated schema outputs (packages/schemas/src/v3/{gitlab,connection,index}.{schema,type}.ts and docs/snippets/schemas/v3/*.mdx) — updated to include webUrl.
CHANGELOG.md
Note: I could not run yarn workspace @sourcebot/schemas generate (dependency install / node execution require approvals that aren't granted in this environment), so the auto-generated schema files were updated by hand to match what the generator would produce. It'd be worth running yarn workspace @sourcebot/schemas build locally to confirm the generated output is identical before merging. The CHANGELOG/PR reference #1457 as the anticipated PR number; adjust if it differs.
Activity
brendan-kellam commentedon Jul 16, 2026
@claude open a PR that adds an optional
webUrlfield to the GitLab config schema. ThewebUrlfield should be used to derive theprojectUrlinrepoCompileUtils.ts. Minimize the amount of comments that you add.claude commentedon Jul 16, 2026
Claude finished @brendan-kellam's task in 9m 15s —— View job •
claude/issue-1456-20260716-1935• Create PR ➔Task: Add optional
webUrlfield to GitLab configwebUrlto the GitLab connection JSON schema (schemas/v3/gitlab.json)webUrlto deriveprojectUrlinrepoCompileUtils.tsSummary
Added an optional
webUrlfield to the GitLab connection config. When set, it's used to build repository links (projectUrl→ repowebUrlandzoekt.web-url) inpackages/backend/src/repoCompileUtils.ts, whileurlcontinues to be used for API calls, avatars, and clone URLs. It defaults to the value ofurlwhen omitted, so existing configs are unaffected.This resolves the case where a self-hosted GitLab serves the API from one host (e.g.
https://api.mygitlab.com) and the web UI from another (e.g.https://mygitlab.com).Files changed:
schemas/v3/gitlab.json— added thewebUrlproperty.packages/backend/src/repoCompileUtils.ts— deriveprojectUrlfromwebUrl.packages/schemas/src/v3/{gitlab,connection,index}.{schema,type}.tsanddocs/snippets/schemas/v3/*.mdx) — updated to includewebUrl.CHANGELOG.md• Branch:
claude/issue-1456-20260716-1935brendan-kellam commentedon Jul 16, 2026
@xPartyBear thx for raising. Shipping your suggestion in #1458. Once it's released, lmk if it resolves your issue
feat(gitlab): add optional webUrl field to derive projectUrl (sourceb…