Skip to content

Azure Repos: repository names ending with .git are stripped when generating SourceLink URLs #1618

Closed

Description

@Eales

When RepositoryUrl points to an Azure Repos repository whose actual name ends with .git,
GetSourceLinkUrl strips the .git suffix from the generated SourceLink URL.

Example:

Input:
https://dev.azure.com/org/project/_git/repo.git

Actual:
https://dev.azure.com/org/project/_apis/git/repositories/repo/items?api-version=1.0&versionType=commit&version=&path=/*

Expected:
https://dev.azure.com/org/project/_apis/git/repositories/repo.git/items?api-version=1.0&versionType=commit&version=&path=/*

This causes 404 responses for repositories whose actual name includes .git.

I have a fix and regression tests prepared.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions