bundlesize icon indicating copy to clipboard operation
bundlesize copied to clipboard

Could not add github status. 403: Resource not accessible by integration

Open ryanio opened this issue 3 years ago • 2 comments

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

Running bundlesize on Github Actions on a PR from fork (with env set GITHUB_TOKEN) fails with:

> web3.js@ bundlesize /home/runner/work/web3.js/web3.js
> bundlesize

 ERROR  Could not add github status.
        403: Resource not accessible by integration 

If the current behavior is a bug, please provide the steps to reproduce.

See ci run here: https://github.com/ethereum/web3.js/pull/3622/checks?check_run_id=847192039#step:6:224

What is the expected behavior?

Should work as expected

Please mention other relevant information.

  • node version
    • 12.x
  • npm version
    • latest
  • Operating system
    • linux
  • bundlesize version
    • 0.18.0
  • CI you are using
    • Github Actions

ryanio avatar Jul 07 '20 20:07 ryanio

Hey!

Forks are tricky because they don't get access to environment tokens of the source repository. Can you confirm that the action has the required token set?

Update: You might want to give bundlesize2 a try as well (work in progress for bundlesize@2), here's a migration guide

siddharthkp avatar Jul 08 '20 06:07 siddharthkp

hey @siddharthkp, thanks for your quick response :)

yes forks are tricky, but since I saw that GITHUB_TOKEN is supported in token.js I thought it would work across forks. e.g. that's how our coveralls github action works. we are passing GITHUB_TOKEN as an env in this step which then runs bundlesize here.

thanks for the link to bundlesize2, looks great and i didn't see it before!

ryanio avatar Jul 08 '20 14:07 ryanio