File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 55name : Check binary size
66
77on :
8- pull_request :
8+ pull_request_target :
99 branches :
1010 - master
1111
@@ -69,13 +69,14 @@ jobs:
6969 const diff_str = `${plus}${diff}B`;
7070
7171 if (diff !== 0) {
72+ const percent = (((updated / reference) - 1) * 100).toFixed(2);
7273 // The body is created here and wrapped so "weirdly" to avoid whitespace at the start of the lines,
7374 // which is interpreted as a code block by Markdown.
7475 const body = `Below is the size of a hello-world Rust program linked with libstd with backtrace.
7576
7677 Original binary size: **${reference}B**
7778 Updated binary size: **${updated}B**
78- Difference: **${diff_str}**`;
79+ Difference: **${diff_str}** (${percent}%) `;
7980
8081 github.rest.issues.createComment({
8182 issue_number: context.issue.number,
You can’t perform that action at this time.
0 commit comments