Repository navigation
[FR] setting webUrl separate from cloneUrl #1456
Description
Activity
@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 finished @brendan-kellam's task in 9m 15s —— View job •
claude/issue-1456-20260716-1935• Create PR ➔
Task: Add optional
webUrlfield to GitLab config- Add
webUrlto the GitLab connection JSON schema (schemas/v3/gitlab.json) - Regenerate schema types (hand-applied, see note below)
- Use
webUrlto deriveprojectUrlinrepoCompileUtils.ts - Update CHANGELOG
- Commit & push
Summary
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.const webUrl = (config.webUrl ?? hostUrl).replace(/\/+$/, ''); // ... const projectUrl = `${webUrl}/${project.path_with_namespace}`;
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.- Generated schema outputs (
packages/schemas/src/v3/{gitlab,connection,index}.{schema,type}.tsanddocs/snippets/schemas/v3/*.mdx) — updated to includewebUrl. 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 runningyarn workspace @sourcebot/schemas buildlocally to confirm the generated output is identical before merging. The CHANGELOG/PR reference#1457as the anticipated PR number; adjust if it differs.• Branch:
claude/issue-1456-20260716-1935- Add
@xPartyBear thx for raising. Shipping your suggestion in #1458. Once it's released, lmk if it resolves your issue
- added a commit that references this issue
on Jul 17, 2026
With a self-hosted GitLab it is possible to have a url like
https://api.mygitlab.comfor services to use tokens and a url likehttps://mygitlab.comfor users to hit.Proposal:
Add an optional config for gitlab provider of
webUrlto match the name in the DB.