Skip to content

bug: ms.date freshness check step summary renders table as plain text #1113

@rezatnoMsirhC

Description

@rezatnoMsirhC

Summary

The GitHub Actions step summary produced by Invoke-MsDateFreshnessCheck.ps1 renders the stale files table as pipe-delimited plain text instead of a formatted markdown table. The root cause is a missing newline between the table separator row and the first data row in the generated markdown.

Affected File

scripts/linting/Invoke-MsDateFreshnessCheck.ps1New-MsDateReport function

Root Cause

In New-MsDateReport, the table header and separator are built via a PowerShell here-string, then data rows are appended in a loop. The separator row and the first data row end up concatenated on the same line in the output file:

|------|---------|------------|| scripts/tests/Fixtures/Frontmatter/valid-docs.md | 2025-01-15 | 420 |

GitHub's markdown parser requires each table row to be on its own line. With the separator and first data row merged, the table is not recognized and falls back to plain text output.

This is visible in logs/msdate-summary.md locally and in the Actions step summary at:
https://github.com/microsoft/hve-core/actions/runs/23136937262

Expected Behavior

The step summary renders a proper markdown table with sortable columns and visual cell borders.

Actual Behavior

The table is displayed as raw pipe-delimited text, making it difficult to scan stale file counts and dates at a glance.

Suggested Fix

Ensure a newline is explicitly present between the separator row and the first data row when building the $markdown string in New-MsDateReport. The here-string ending or the loop initialization should guarantee a \n boundary.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions