Skip to content

Commit

Permalink
pr-fix: use gh summary
Browse files Browse the repository at this point in the history
  • Loading branch information
stijnmoreels committed Jul 31, 2024
1 parent f64f7b7 commit 9d22961
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions build/templates/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
inputs:
reports: '$(Agent.TempDirectory)/**/coverage.cobertura.xml'
targetdir: coveragereport
reporttypes: Html;HtmlInline_AzurePipelines_Dark;Cobertura;MarkdownAssembliesSummary
reporttypes: Html;HtmlInline_AzurePipelines_Dark;Cobertura;MarkdownSummaryGithub
publishCodeCoverageResults: true

- script: sudo apt install gh
Expand All @@ -89,9 +89,11 @@ jobs:
gh repo view
$comments = gh pr view $env:PR_NUMBER --json comments --jq '.comments[].body'
$commentExists = $comments | Where-Object { $_ -like "*Cobertura*" }
$commentExists = $comments | Where-Object { $_ -like "*Code coverage summary*" }
$content = Get-Content -Path './coveragereport/SummaryGithub.md' -Raw
$content = $content[0..($content.IndexOf('## Coverage'))]
$content = Get-Content -Path './coveragereport/Summary.md' -Raw
if ($commentExists) {
gh pr comment $env:PR_NUMBER --body $content --edit-last
} else {
Expand Down

0 comments on commit 9d22961

Please sign in to comment.