Skip to content

Commit

Permalink
Merge pull request rust-lang#546 from Kobzol/ci-workflow-pr-target
Browse files Browse the repository at this point in the history
CI: switch to `pull_request_target`
  • Loading branch information
workingjubilee authored Jul 6, 2023
2 parents 3ad43df + a16c573 commit f3af31c
Showing 1 changed file with 3 additions and 2 deletions.
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

0 comments on commit f3af31c

Please sign in to comment.