Skip to content

GitLab repository URLs with nested groups/subgroups are rejected by validator #1359

Description

@bt-cj

The gitlabURLRegex in internal/validators/utils.go only allows two path segments (owner/repo), rejecting valid GitLab URLs with subgroups.

Current:
^https?://(www\.)?gitlab\.com/[\w.-]+/[\w.-]+/?$
Fix:
^https?://(www\.)?gitlab\.com/[\w./-]+/[\w.-]+/?$

Example: https://gitlab.com/myorg/team/subgroup/my-mcp-server → invalid repository URL.

GitLab subgroups are a standard feature used in GitLab Enterprise. The current regex is preventing self-hosted registries from publishing servers whose source lives in a GitLab group hierarchy.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions