Skip to content

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

@Eales

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions