Skip to content

Commit 8384be4

Browse files
Fix sourcelink repository url (#7844) (#7847)
* Fix sourcelink repository url When we updated the ScmRepositoryUrl to handle devdiv links, we never updated the version used in SourceRoot, which is used by sourcelink, and also needed to be updated to remove -trusted from the link. By not removing -trusted, the translation pattern can't identify the url as something that needs to be translated, and so just uses the azdo url. This change adds the code to remove -trusted to fix the issue. * Remove second item group
1 parent eecf503 commit 8384be4

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/Microsoft.DotNet.Arcade.Sdk/tools/RepositoryInfo.targets

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@
7272
</PropertyGroup>
7373

7474
<ItemGroup>
75+
<SourceRoot Update="@(SourceRoot)">
76+
<ScmRepositoryUrl Condition="$([System.String]::Copy(%(SourceRoot.ScmRepositoryUrl)).Contains(`devdiv.visualstudio`))">$([System.String]::Copy(%(SourceRoot.ScmRepositoryUrl)).ToLower().Replace(`-trusted`,``))</ScmRepositoryUrl>
77+
</SourceRoot>
7578
<SourceRoot Update="@(SourceRoot)">
7679
<ScmRepositoryUrl>$([System.Text.RegularExpressions.Regex]::Replace(%(SourceRoot.ScmRepositoryUrl), $(_TranslateUrlPattern), $(_TranslateUrlReplacement)))</ScmRepositoryUrl>
7780
</SourceRoot>

0 commit comments

Comments
 (0)