Skip to content

Commit 4dcbfbf

Browse files
starkmsuCopilot
andcommitted
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 1840ebe commit 4dcbfbf

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

ci/triage-report.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,14 @@ async function fetchAll() {
111111
console.log(`Report: in-scope=${stats.total} sla=${stats.sla} regressions=${stats.regressions} new7=${stats.new7}`);
112112

113113
if (process.env.GITHUB_STEP_SUMMARY) {
114-
fs.appendFileSync(process.env.GITHUB_STEP_SUMMARY, `## ${REPORT_TITLE} \u2014 ${date}\n\n\`\`\`\n${text}\n\`\`\`\n`);
114+
const tickRuns = [...text.matchAll(/`+/g)].map(m => m[0].length);
115+
const fence = '`'.repeat(Math.max(3, ...tickRuns) + 1);
116+
fs.appendFileSync(process.env.GITHUB_STEP_SUMMARY, `## ${REPORT_TITLE}${date}
117+
118+
${fence}
119+
${text}
120+
${fence}
121+
`);
115122
}
116123
if (process.env.WRITE_FILES === 'true') {
117124
fs.writeFileSync('triage-report.html', html);

0 commit comments

Comments
 (0)