From 39edf9634e00f626ac3e5facf90446c188cdce75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89verton=20Toffanetto?= Date: Sat, 3 Oct 2026 10:40:45 -0300 Subject: [PATCH] chore(size): keep the size comparison green on fork PRs A fork PR's token is read-only, so posting the report comment answered 403 and the compare job showed as failed on every external PR. The report now also goes to the job summary, and the comment only runs on PRs from this repository. --- .github/workflows/size.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/size.yml b/.github/workflows/size.yml index 45ffe883f..96b9fc194 100644 --- a/.github/workflows/size.yml +++ b/.github/workflows/size.yml @@ -116,7 +116,14 @@ jobs: path: scripts/size - run: node report.mjs size-head.json size-base.json > size-comment.md working-directory: scripts/size - - uses: actions/github-script@v7 + # The job summary carries the report on every PR. The comment only goes + # on PRs from this repository: a fork PR's token is read-only, so + # createComment answered 403 and the job showed as failed on every + # external PR. + - run: cat size-comment.md >> "$GITHUB_STEP_SUMMARY" + working-directory: scripts/size + - if: github.event.pull_request.head.repo.full_name == github.repository + uses: actions/github-script@v7 with: script: | const fs = require("fs");