Skip to content

Commit f3b4e7c

Browse files
devversionandrewseguin
authored andcommitted
build: payload status should not show all digits (#6051)
* Currently we always limit the difference in kilobytes to two digits after the decimal point. This also needs to be done for the full package size to avoid super long numbers.
1 parent 055f662 commit f3b4e7c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/dashboard/functions/payload-github-status.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,12 @@ export const payloadGithubStatus = https.onRequest(async (request, response) =>
3636
// Better message about the diff that shows whether the payload increased or decreased.
3737
const diffMessage = packageDiff < 0 ? 'decrease' : 'increase';
3838
const diffFormatted = Math.abs(packageDiff).toFixed(2);
39+
const packageSizeFormatted = packageSize.toFixed(2);
3940

4041
await setGithubStatus(commitSha, {
4142
result: true,
4243
name: `${capitalizeFirstLetter(packageName)} Payload Size`,
43-
description: `${packageSize}kb / ${diffFormatted}kb ${diffMessage} (ES2015 bundle)`
44+
description: `${packageSizeFormatted}kb / ${diffFormatted}kb ${diffMessage} (ES2015 bundle)`
4445
});
4546

4647
response.json({message: 'Payload Github status successfully set.'});

0 commit comments

Comments
 (0)