Skip to content

Commit e9ce11b

Browse files
committed
fixes & cleanup
1 parent c129348 commit e9ce11b

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

dev-packages/size-limit-gh-action/index.mjs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,6 @@ async function run() {
158158

159159
const body = bodyParts.join('\r\n');
160160

161-
core.debug(`Posting PR comment: \n\n${body}`);
162-
163161
try {
164162
if (!sizeLimitComment) {
165163
await octokit.rest.issues.createComment({
@@ -181,7 +179,6 @@ async function run() {
181179
}
182180
} else {
183181
core.debug('Skipping comment because there are no changes.');
184-
core.debug(`Base result:\n\n${JSON.stringify(base, null, 2)}`);
185182
}
186183

187184
if (status > 0) {

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

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import * as core from '@actions/core';
21
import bytes from 'bytes';
32

43
const SIZE_RESULTS_HEADER = ['Path', 'Size', '% Change', 'Change'];
@@ -18,7 +17,7 @@ export class SizeLimitFormatter {
1817
return this.formatBytes(size);
1918
}
2019

21-
return `⛔️ ${this.formatBytes(size)} (max: ${this.formatBytes(sizeLimit)})`;
20+
return `⛔️ ${this.formatBytes(size)}\n(max: ${this.formatBytes(sizeLimit)})`;
2221
}
2322

2423
formatPercentageChange(base = 0, current = 0) {
@@ -104,19 +103,10 @@ export class SizeLimitFormatter {
104103

105104
const names = [...new Set([...Object.keys(base), ...Object.keys(current)])];
106105

107-
core.debug('hasSizeChanges....', names);
108-
109106
return names.some(name => {
110107
const baseResult = base[name] || EmptyResult;
111108
const currentResult = current[name] || EmptyResult;
112109

113-
// DEBUGGING?!
114-
core.debug(
115-
`comparing ${name} - ${baseResult.size} vs ${currentResult.size} - ${
116-
Math.abs((currentResult.size - baseResult.size) / baseResult.size) * 100
117-
}`,
118-
);
119-
120110
if (!baseResult.size || !currentResult.size) {
121111
return true;
122112
}

0 commit comments

Comments
 (0)