Skip to content

Commit 81aa7e4

Browse files
committed
test
1 parent 7dacf50 commit 81aa7e4

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

eng/pipelines/templates/VerifyCoverageReport.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ steps:
3333
3434
- ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest')) }}:
3535
- task: GitHubComment@0
36+
condition: always()
3637
inputs:
3738
gitHubConnection: dotnet-comment-bot-service-connection
3839
repositoryName: '$(Build.Repository.Name)'

eng/scripts/ValidateProjectCoverage.ps1

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ if ($Kudos.Count -ne 0) {
143143
-AutoSize -Wrap
144144
Write-Host "##vso[task.logissue type=warning;]Good job! The coverage increased, please update your projects"
145145

146-
$KudosMarkdown = @(':tada: **Good job! The coverage increased** :tada:', '', '| Project | Expected | Actual |', '| --- | ---: | ---: |', $KudosMarkdown, '');
146+
$KudosMarkdown = @(':tada: **Good job! The coverage increased** :tada:', "`r`n", '| Project | Expected | Actual |', '| --- | ---: | ---: |', $KudosMarkdown, "`r`n`r`n");
147147
}
148148

149149
if ($Errors.Count -ne 0) {
@@ -156,7 +156,7 @@ if ($Errors.Count -ne 0) {
156156
@{ Name="Coverage Type"; Expression="Coverage Type"; Width=10; Alignment = "Center" } `
157157
-AutoSize -Wrap
158158

159-
$ErrorsMarkdown = @(":exclamation: **Found $($Errors.Count) issues** :exclamation: ", '', '| Project | Coverage Type |Expected | Actual | ', '| --- | :---: | ---: | ---: |', $ErrorsMarkdown);
159+
$ErrorsMarkdown = @(":exclamation: **Found $($Errors.Count) issues** :exclamation: ", "`r`n", '| Project | Coverage Type |Expected | Actual | ', '| --- | :---: | ---: | ---: |', $ErrorsMarkdown, "`r`n`r`n");
160160
}
161161

162162
# Write out markdown for publishing back to AzDO
@@ -167,7 +167,15 @@ $KudosMarkdown | Out-File coverage-report.md -Encoding ascii -Append
167167
# Set the AzDO variable used by GitHubComment@0 task
168168
[string]$markdown = Get-Content coverage-report.md -Raw
169169
if (![string]::IsNullOrWhiteSpace($markdown)) {
170-
$gitHubCommentVar = '##vso[task.setvariable variable=GITHUB_COMMENT]' + $markdown.Replace("`n","%0D%0A")
170+
# Add link back to the Code Coverage board
171+
$link = "$($env:SYSTEM_COLLECTIONURI)$env:SYSTEM_TEAMPROJECT/_build/results?buildId=$env:BUILD_BUILDID&view=codecoverage-tab"
172+
$markdown = "$markdown`n`nFull code coverage report: $link"
173+
174+
Write-Host "---- GitHub comment ---"
175+
Write-Host $markdown
176+
Write-Host "---- GitHub comment ---"
177+
178+
$gitHubCommentVar = '##vso[task.setvariable variable=GITHUB_COMMENT]' + $markdown.Replace("`r`n","`n").Replace("`n","%0D%0A")
171179
Write-Host $gitHubCommentVar
172180
}
173181

src/Libraries/Microsoft.Extensions.Http.AutoClient/Microsoft.Extensions.Http.AutoClient.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<PropertyGroup>
1313
<Stage>normal</Stage>
14-
<MinCodeCoverage>94</MinCodeCoverage>
14+
<MinCodeCoverage>98</MinCodeCoverage>
1515
<MinMutationScore>100</MinMutationScore>
1616
</PropertyGroup>
1717

0 commit comments

Comments
 (0)