Skip to content

[release/10.0.4xx] Preserve .git suffix in repository names when generating SourceLink URLs#1658

Merged
tmat merged 10 commits intorelease/10.0.4xxfrom
backport/pr-1619-to-release/10.0.4xx
Apr 27, 2026
Merged

[release/10.0.4xx] Preserve .git suffix in repository names when generating SourceLink URLs#1658
tmat merged 10 commits intorelease/10.0.4xxfrom
backport/pr-1619-to-release/10.0.4xx

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Backport of #1619 to release/10.0.4xx

/cc @tmat @Eales

Eales and others added 10 commits April 24, 2026 11:43
Do not strip the `.git` suffix from repository names in GetSourceLinkUrlGitTask.
Some repositories legitimately include `.git` as part of their name, and removing
the suffix produces incorrect SourceLink URLs and 404 responses.

This change keeps `.git` when it is part of the repository name.

Additionally update the GitWeb provider to avoid appending `.git` when the
suffix is already present, preventing URLs like `repo.git.git`.

Add regression tests for repository names ending with `.git`.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ty before returning it. The null-forgiving operator is used here to satisfy the nullable analysis.
The previous change modified the shared Git SourceLink task to preserve the
`.git` suffix in repository names. This introduced regressions in other
providers (e.g. Bitbucket and Common tests).

The fix will be moved to the Azure Repos provider where the exact repository
name is required by the Azure DevOps API, instead of changing the shared
behavior for all providers.
…ies ending with .git

Ensure that repository names ending with ".git" are not treated the same
as repositories without the suffix and that the suffix is preserved in
the generated SourceLink URL.
Fix build failure caused by accidentally duplicated test methods
introduced while adding regression tests for repository names
ending with `.git`.
Restore error comment – removal was unintentional.
@tmat tmat merged commit 898dc0f into release/10.0.4xx Apr 27, 2026
9 checks passed
@tmat tmat deleted the backport/pr-1619-to-release/10.0.4xx branch April 27, 2026 08:01
@tmat tmat added this to the 10.0.4xx milestone Apr 27, 2026
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.

2 participants