You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When opening a pull request, a job titled 'Bundles - size-limit' will be executed to calculate the size increase of packages added via the package manager. I believe this is too see any changes to the compiled size introduced via a PR, yet due the nature of pull_request_target by default using the context of the base ref of the PR, it compares main with main.
Lexical version: N/A
Steps To Reproduce
Open a Pull Request from any branch
Let the 'Bundles - size-limit' workflow run
View the actions/checkout@v4 step to check the ref debug log to see its set to refs/head/main
Do you have an example where the size is expected to change but did not? The example in 2 is not a good one, cross-spawn is a build time dependency, and would not have any effect whatsoever on bundle size.
@etrepum I checkout a random commit from a few months (1f778da76afbd991121712c0f2f9cf6087ecc8d9) and then pushed to a new branch ci/test-size-limit. Running the size check on my local i get the following results:
When opening a pull request, a job titled 'Bundles - size-limit' will be executed to calculate the size increase of packages added via the package manager. I believe this is too see any changes to the compiled size introduced via a PR, yet due the nature of
pull_request_target
by default using the context of the base ref of the PR, it comparesmain
withmain
.Lexical version:
N/A
Steps To Reproduce
actions/checkout@v4
step to check theref
debug log to see its set torefs/head/main
Link to code example:
package.json
, yet size-limit comment shows no size increaseThe current behavior
'Bundles - size-limit' checkouts the base of the PR (most of the time
main
) and compares the built size withmain
The expected behavior
'Bundles - size-limit' checkouts the head of the PR and compares the built size with
main
Impact of fix
This happens on every pull request. Fixing involves 2 possible solutions:
github.pull_request.head_ref
asref
for the checkout actionnpm install
&npm run build
is executed on untrusted code when a PR is raised.pull_request
event trigger, but this workflow will now require approvalThe text was updated successfully, but these errors were encountered: