Skip to content

CI: switch to pull_request_target #546

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/check-binary-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name: Check binary size

on:
pull_request:
pull_request_target:
branches:
- master

Expand Down Expand Up @@ -69,13 +69,14 @@ jobs:
const diff_str = `${plus}${diff}B`;

if (diff !== 0) {
const percent = (((updated / reference) - 1) * 100).toFixed(2);
// The body is created here and wrapped so "weirdly" to avoid whitespace at the start of the lines,
// which is interpreted as a code block by Markdown.
const body = `Below is the size of a hello-world Rust program linked with libstd with backtrace.

Original binary size: **${reference}B**
Updated binary size: **${updated}B**
Difference: **${diff_str}**`;
Difference: **${diff_str}** (${percent}%)`;

github.rest.issues.createComment({
issue_number: context.issue.number,
Expand Down