Skip to content

Commit 96ff2f6

Browse files
andimarekclaude
andcommitted
Restore emoji in per-class deltas, break long class names with <br>
Inner class names are kept but wrapped onto a second line at the $ boundary using <br> to keep the table narrow. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent b4e086c commit 96ff2f6

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/workflows/pull_request.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -302,15 +302,17 @@ jobs:
302302
changedClasses.sort((a, b) => a.name.localeCompare(b.name));
303303
304304
function shortenClass(name) {
305-
const mainPart = name.replace(/\$.*$/, '');
305+
const dollarIdx = name.indexOf('$');
306+
const mainPart = dollarIdx >= 0 ? name.substring(0, dollarIdx) : name;
307+
const suffix = dollarIdx >= 0 ? name.substring(dollarIdx) : '';
306308
const parts = mainPart.split('.');
307309
const shortened = parts.map((p, i) => i < parts.length - 1 ? p[0] : p);
308-
return shortened.join('.');
310+
const result = shortened.join('.') + suffix;
311+
return result.replace(/\$/g, '<br>\\$');
309312
}
310313
311314
function fmtClassDelta(delta) {
312-
if (Math.abs(delta) < 0.05) return '±0.0%';
313-
return delta > 0 ? `+${delta.toFixed(1)}%` : `${delta.toFixed(1)}%`;
315+
return fmtPctDelta(delta, 0);
314316
}
315317
316318
if (changedClasses.length > 0) {
@@ -319,9 +321,9 @@ jobs:
319321
body += '|:------|-----:|-------:|-------:|\n';
320322
for (const c of changedClasses) {
321323
if (c.removed) {
322-
body += `| \`${shortenClass(c.name)}\` | *removed* | *removed* | *removed* |\n`;
324+
body += `| ${shortenClass(c.name)} | *removed* | *removed* | *removed* |\n`;
323325
} else {
324-
body += `| \`${shortenClass(c.name)}\` | ${fmtClassDelta(c.lineDelta)} | ${fmtClassDelta(c.branchDelta)} | ${fmtClassDelta(c.methodDelta)} |\n`;
326+
body += `| ${shortenClass(c.name)} | ${fmtClassDelta(c.lineDelta)} | ${fmtClassDelta(c.branchDelta)} | ${fmtClassDelta(c.methodDelta)} |\n`;
325327
}
326328
}
327329
body += '\n';

0 commit comments

Comments
 (0)