Skip to content

fix(pull-requests): route self-hosted GitLab remotes - #6061

Merged
juliusmarminge merged 2 commits into
pingdotgg:mainfrom
GuilhermeVieiraDev:fix/pull-requests-self-hosted-gitlab
Aug 11, 2026
Merged

fix(pull-requests): route self-hosted GitLab remotes#6061
juliusmarminge merged 2 commits into
pingdotgg:mainfrom
GuilhermeVieiraDev:fix/pull-requests-self-hosted-gitlab

Conversation

@GuilhermeVieiraDev

@GuilhermeVieiraDev GuilhermeVieiraDev commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

What Changed

  • Refine unknown self-hosted repository providers from their remote URLs before listing pull requests.
  • Preserve the caller-selected remote when resolving source-control handles.
  • Add focused coverage for self-hosted GitLab routing and remote selection.

Why

Self-hosted GitLab repositories were recorded as unknown and could not be routed to the GitLab pull request provider. This change detects the provider from the repository remote and refines it using the matching remote context, allowing merge requests to be listed correctly without selecting a different configured remote.

UI Changes

Before:
image

After:
image

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Medium Risk
Changes how pull request hosts are resolved for unknown providers and extends source-control handle resolution; behavior is localized to listing/workspace classification with new tests, but incorrect refinement could mis-route API calls to the wrong provider.

Overview
Self-hosted GitLab repos that were stored with provider unknown can now show up on the pull request list by resolving the real host kind from each project's remote before workspace projects are classified.

Pull request listing runs a new refineUnknownProjectKinds step (deduped per provider base URL, concurrent with existing repo limits) that calls SourceControlProviderRegistry.resolveHandle with the project's remoteUrl / remoteName. Resolved kinds replace unknown when picking the pull request provider, so merge requests go through GitLab instead of staying unimplemented.

Source control registry: resolveHandle accepts an optional context. With context, it refines that caller-chosen remote via refineUnknownRemoteProvider instead of the cwd detection cache—which could pick a different configured remote (e.g. origin on GitHub while upstream is self-hosted GitLab).

Wiring: PullRequestServiceLive now provides SourceControlProviderRegistryLayerLive. Tests cover self-hosted GitLab list refinement and remote-preserving handle resolution.

Reviewed by Cursor Bugbot for commit 9d71b19. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Fix routing for self-hosted GitLab remotes in pull request service

  • Projects with an unknown provider kind are now refined before listing merge requests by inspecting their remote URL and consulting SourceControlProviderRegistry.
  • Extends SourceControlProviderRegistry.resolveHandle to accept an optional SourceControlProviderContext, bypassing the cache and running provider refinement against the supplied context instead of auto-detecting.
  • Wires SourceControlProviderRegistryLayerLive into the PullRequestService layer composition in server.ts.
📊 Macroscope summarized 9d71b19. 3 files reviewed, 0 issues evaluated, 0 issues filtered, 0 comments posted

🗂️ Filtered Issues

No issues evaluated.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 58bb7ce7-48de-492d-8405-dbb7c4d3bc3b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Aug 10, 2026
Comment thread apps/server/src/pullRequest/PullRequestService.ts Outdated
Comment thread apps/server/src/pullRequest/PullRequestService.ts Outdated
@macroscopeapp

macroscopeapp Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR introduces new runtime behavior: projects previously marked as "unknown" provider now undergo active refinement via network calls to detect self-hosted GitLab instances. While well-tested, this changes the processing flow for pull request listing and enables routing to previously-unused code paths.

You can customize Macroscope's approvability policy. Learn more.

@juliusmarminge
juliusmarminge merged commit f5fce74 into pingdotgg:main Aug 11, 2026
18 checks passed
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Aug 11, 2026
xiaogwu pushed a commit to xiaogwu/t3code that referenced this pull request Aug 11, 2026
Brings in 7 upstream commits, including two that touch the same code as the
pinned-reorder work: Copy Thread ID in the thread context menu (pingdotgg#5574) and
shift+click new-thread-in-project (pingdotgg#5994). Merged clean, no conflicts.

Also picks up the hourly past-24h usage view (pingdotgg#6170), the GitLab self-hosted
remote routing fix (pingdotgg#6061), mobile composer stabilisation (pingdotgg#5986), the App
Store release version guard (pingdotgg#6177), and the typography font-size default
restore (pingdotgg#6172). pnpm-workspace.yaml, pnpm-lock.yaml and four patches/ files
changed, so this needs a fresh install before it builds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants