[PR #1214] [MERGED] Fix size comparison workflow on fork PRs #3598

Closed
opened 2026-02-28 20:44:00 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/1214
Author: @j-f1
Created: 6/27/2023
Status: Merged
Merged: 6/28/2023
Merged by: @j-f1

Base: masterHead: jed/fork-size


📝 Commits (4)

📊 Changes

3 files changed (+83 additions, -55 deletions)

View changed files

📝 .github/workflows/build.yml (+0 -55)
.github/workflows/size-compare.yml (+77 -0)
upcoming-release-notes/1214.md (+6 -0)

📄 Description

This PR moves the size comparison action back to a separate workflow which now uses the pull_request_target event. This event is triggered at all the same times as the pull_request action, except that the workflow file content comes from the target branch of the PR, and it is run in the context of the repo owning the target branch. Practically, this means that it will still have access to post a comment even if the PR comes from a fork.

We don’t want the build actions to be run in a pull_request_target workflow because they would get access to the secrets and be able to perform arbitrary actions on the repository, even from fork PRs.

See the current version failing here: https://github.com/actualbudget/actual/actions/runs/5395184895/jobs/9797388016?pr=1122


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/1214 **Author:** [@j-f1](https://github.com/j-f1) **Created:** 6/27/2023 **Status:** ✅ Merged **Merged:** 6/28/2023 **Merged by:** [@j-f1](https://github.com/j-f1) **Base:** `master` ← **Head:** `jed/fork-size` --- ### 📝 Commits (4) - [`2a7fedc`](https://github.com/actualbudget/actual/commit/2a7fedc9f5393e4e13e03a0c74e5c99bd8a84bcd) Move size comparison action back to a separate workflow - [`c09fbd7`](https://github.com/actualbudget/actual/commit/c09fbd7bd33050fcce9cb4f692c15e39191d79d9) Add a scary warning - [`3d1e0e2`](https://github.com/actualbudget/actual/commit/3d1e0e22cc8bb22e8ec200b5a0dfb96e4b7cba20) Add release note - [`36abf4b`](https://github.com/actualbudget/actual/commit/36abf4b4fcc8c9246c921dd70efab5fed5ccadd9) Add link ### 📊 Changes **3 files changed** (+83 additions, -55 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/build.yml` (+0 -55) ➕ `.github/workflows/size-compare.yml` (+77 -0) ➕ `upcoming-release-notes/1214.md` (+6 -0) </details> ### 📄 Description This PR moves the size comparison action back to a separate workflow which now uses the `pull_request_target` event. This event is triggered at all the same times as the `pull_request` action, except that the workflow file content comes from the target branch of the PR, and it is run in the context of the repo owning the target branch. Practically, this means that it will still have access to post a comment even if the PR comes from a fork. We don’t want the build actions to be run in a `pull_request_target` workflow because they would get access to the secrets and be able to perform arbitrary actions on the repository, even from fork PRs. See the current version failing here: https://github.com/actualbudget/actual/actions/runs/5395184895/jobs/9797388016?pr=1122 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-02-28 20:44:00 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#3598