Skip to content

feat(gitlab): add optional webUrl field to derive projectUrl#1458

Merged
brendan-kellam merged 4 commits into
mainfrom
claude/issue-1456-20260716-1935
Jul 16, 2026
Merged

feat(gitlab): add optional webUrl field to derive projectUrl#1458
brendan-kellam merged 4 commits into
mainfrom
claude/issue-1456-20260716-1935

Conversation

@brendan-kellam

@brendan-kellam brendan-kellam commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Fixes #1456

Adds an optional webUrl field to the GitLab connection config schema. When set, it is used to derive the projectUrl (repository web links) in repoCompileUtils.ts, letting the API host (url) differ from the browsable host (webUrl). Defaults to url when 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 webUrl on GitLab connection config so “Open in GitLab” and stored repo webUrl / Zoekt metadata use a browsable host when url points at a separate API endpoint.

compileGitlabConfig now derives projectUrl from webUrl (defaulting to url) while hostUrl still 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

    • Added an optional GitLab webUrl setting to generate repository links in the GitLab web UI.
    • Repository links can now use a separate web host from the GitLab API host.
    • If webUrl is not provided, it defaults to the existing GitLab url (with trailing slashes handled for consistent link creation).
  • Documentation

    • Updated the v3 GitLab connection configuration schemas and examples to include webUrl.
    • Added the change to the unreleased changelog.

github-actions Bot and others added 3 commits July 16, 2026 19:44
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]>
@mintlify

mintlify Bot commented Jul 16, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
sourcebot 🟢 Ready View Preview Jul 16, 2026, 7:58 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2cd8a655-38a6-45e4-9196-9b825e78ea28

📥 Commits

Reviewing files that changed from the base of the PR and between cd6848e and f6b7866.

📒 Files selected for processing (1)
  • CHANGELOG.md

Walkthrough

GitLab connection configuration now supports an optional webUrl for repository links. Schemas and types document and validate the field, while compileGitlabConfig uses it instead of the API host when constructing project URLs.

Changes

GitLab web URL configuration

Layer / File(s) Summary
GitLab webUrl contract
packages/schemas/src/v3/*, schemas/v3/gitlab.json, docs/snippets/schemas/v3/*, CHANGELOG.md
GitLab configuration types and schemas define optional URL-validated webUrl, document its fallback to url, and include matching generated documentation and changelog text.
Repository link host selection
packages/backend/src/repoCompileUtils.ts
compileGitlabConfig prefers config.webUrl, removes trailing slashes, and uses the resulting base URL for GitLab project links.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR adds the optional GitLab webUrl config and uses it to build repo links, matching issue #1456.
Out of Scope Changes check ✅ Passed The docs, schema, type, and changelog updates are directly tied to the GitLab webUrl feature.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding an optional GitLab webUrl field to derive project URLs.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/issue-1456-20260716-1935

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot 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.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 0c66885 and cd6848e.

📒 Files selected for processing (12)
  • CHANGELOG.md
  • docs/snippets/schemas/v3/connection.schema.mdx
  • docs/snippets/schemas/v3/gitlab.schema.mdx
  • docs/snippets/schemas/v3/index.schema.mdx
  • packages/backend/src/repoCompileUtils.ts
  • packages/schemas/src/v3/connection.schema.ts
  • packages/schemas/src/v3/connection.type.ts
  • packages/schemas/src/v3/gitlab.schema.ts
  • packages/schemas/src/v3/gitlab.type.ts
  • packages/schemas/src/v3/index.schema.ts
  • packages/schemas/src/v3/index.type.ts
  • schemas/v3/gitlab.json

Comment thread packages/backend/src/repoCompileUtils.ts
Comment thread schemas/v3/gitlab.json
@mintlify

mintlify Bot commented Jul 16, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
sourcebot 🟡 Building Jul 16, 2026, 7:57 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@brendan-kellam brendan-kellam merged commit 8dba6b2 into main Jul 16, 2026
8 checks passed
@brendan-kellam brendan-kellam deleted the claude/issue-1456-20260716-1935 branch July 16, 2026 20:19
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.

[FR] setting webUrl separate from cloneUrl

1 participant