Skip to content

Commit f3af31c

Browse files
Merge pull request #546 from Kobzol/ci-workflow-pr-target
CI: switch to `pull_request_target`
2 parents 3ad43df + a16c573 commit f3af31c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/check-binary-size.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
name: Check binary size
66

77
on:
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,

0 commit comments

Comments
 (0)