Skip to content

fix(repoData): correctly extract server names #166

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

liady
Copy link
Collaborator

@liady liady commented May 25, 2025

Fixes #163

@Copilot Copilot AI review requested due to automatic review settings May 25, 2025 16:02
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes how the repository segment is extracted for subdomain patterns, adds tests for longer paths, and updates the route loader to normalize returned URLs based on urlType.

  • Extract only the first path segment as repo in getRepoData for subdomains
  • Add test cases for longer paths on both GitHub and subdomain hosts
  • Update the route loader to build a simplified url field according to urlType

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/shared/repoData.ts Extract repo from the first path segment instead of using the full path
src/shared/repoData.test.ts Added test cases for “long” paths in both GitHub and subdomain modes
app/routes/$.tsx Introduced protocol extraction and conditional URL formatting in loader

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.

Cursor Error: server and tool name exceeds 60 characters
1 participant