Skip to content

Commit 5b05303

Browse files
committed
add debug log
1 parent 30f4a40 commit 5b05303

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

dev-packages/size-limit-gh-action/utils/SizeLimitFormatter.mjs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import * as core from '@actions/core';
12
import bytes from 'bytes';
23

34
const SIZE_RESULTS_HEADER = ['Path', 'Size', '% Change', 'Change'];
@@ -71,6 +72,12 @@ export class SizeLimitFormatter {
7172
}
7273

7374
formatSizeResult(name, base, current) {
75+
if (!current.passed) {
76+
core.debug(
77+
`Size limit exceeded for ${name} - ${this.formatBytes(current.size)} > ${this.formatBytes(current.sizeLimit)}`,
78+
);
79+
}
80+
7481
return [
7582
this.formatName(name, current.sizeLimit, current.passed),
7683
this.formatBytes(current.size),

0 commit comments

Comments
 (0)