feat(gitlab): add optional webUrl field to derive projectUrl#1458
Conversation
Adds an optional `webUrl` field to the GitLab connection config schema. When set, it is used to construct repository links in the GitLab web UI, letting the API host (`url`) differ from the browsable host (`webUrl`). Fixes #1456 Co-authored-by: Brendan Kellam <[email protected]>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughGitLab connection configuration now supports an optional ChangesGitLab web URL configuration
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/backend/src/repoCompileUtils.ts`:
- Around line 170-176: Update the GitLab project URL construction in the
gitlabRepos.map callback to use the URL API rather than string concatenation.
Build the URL from webUrl and project.path_with_namespace, ensuring any existing
search or hash is discarded while preserving the existing trailing-slash
handling.
In `@schemas/v3/gitlab.json`:
- Around line 25-33: Update the webUrl validation in the GitLab schema used by
compileGitlabConfig to reject query (`?`) and fragment (`#`) characters,
ensuring only plain base URLs are accepted while preserving the existing
protocol and host constraints.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: fbf29401-46f8-4c55-89dd-b59653992004
📒 Files selected for processing (12)
CHANGELOG.mddocs/snippets/schemas/v3/connection.schema.mdxdocs/snippets/schemas/v3/gitlab.schema.mdxdocs/snippets/schemas/v3/index.schema.mdxpackages/backend/src/repoCompileUtils.tspackages/schemas/src/v3/connection.schema.tspackages/schemas/src/v3/connection.type.tspackages/schemas/src/v3/gitlab.schema.tspackages/schemas/src/v3/gitlab.type.tspackages/schemas/src/v3/index.schema.tspackages/schemas/src/v3/index.type.tsschemas/v3/gitlab.json
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Fixes #1456
Adds an optional
webUrlfield to the GitLab connection config schema. When set, it is used to derive theprojectUrl(repository web links) inrepoCompileUtils.ts, letting the API host (url) differ from the browsable host (webUrl). Defaults tourlwhen omitted.Generated with Claude Code
Note
Low Risk
Backward-compatible config default; only affects external link URLs for GitLab, not sync or clone behavior beyond existing hostUrl usage.
Overview
Adds an optional
webUrlon GitLab connection config so “Open in GitLab” and stored repowebUrl/ Zoekt metadata use a browsable host whenurlpoints at a separate API endpoint.compileGitlabConfignow derivesprojectUrlfromwebUrl(defaulting tourl) whilehostUrlstill drives API calls, clone protocol, and avatars. Schemas, generated types/docs, and the unreleased changelog are updated accordingly.Reviewed by Cursor Bugbot for commit f6b7866. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit
New Features
webUrlsetting to generate repository links in the GitLab web UI.webUrlis not provided, it defaults to the existing GitLaburl(with trailing slashes handled for consistent link creation).Documentation
webUrl.