Coder Social home page Coder Social logo

Comments (9)

siddharthkp avatar siddharthkp commented on June 10, 2024 1

@maestromac You are right. CI tools don't expose the token in forks to protect your tokens. The solution to this is not to make your token public either :)

I have an alternate solution in mind and will test it in the beta branch soon 👍

from bundlesize.

maestromac avatar maestromac commented on June 10, 2024 1

@siddharthkp yes Travis provides TRAVIS_REPO_SLUG which should return the source repo (source).

I think the new version sound like the exact solution we need. I'm going to give bundlesize2 a try soon and let you know.

from bundlesize.

maestromac avatar maestromac commented on June 10, 2024 1

@siddharthkp initial use seems to be working without issue 👍 . Will let you know if we hit anything

from bundlesize.

siddharthkp avatar siddharthkp commented on June 10, 2024 1

That's great! Closing the issue here. But will explore fork use case in the other repo

from bundlesize.

Haroenv avatar Haroenv commented on June 10, 2024

No, the GitHub token is private

from bundlesize.

fgerschau avatar fgerschau commented on June 10, 2024

Just encrypt it with

travis encrypt BUNDLESIZE_GITHUB_TOKEN="your-key" --add env.global

or add it as an environment variable in the settings of your travis repo

from bundlesize.

maestromac avatar maestromac commented on June 10, 2024

@fgerschau Thanks for the suggestion but that wouldn't work because PR from forked repository won't have access to it ref

Encrypted environment variables are not available to pull requests from forks due to the security risk of exposing such information to unknown code.

from bundlesize.

rhymes avatar rhymes commented on June 10, 2024

@siddharthkp any updates on the alternate solution? Thank you!

from bundlesize.

siddharthkp avatar siddharthkp commented on June 10, 2024

Hey! I'm working on a new version (1.0.0) of bundlesize that fixes all of these problems. For source repo - it uses github apps + checks

Don't have a solution for forks yet - but something I want to play around with more.

It doesn't require a token but still needs a way to identify the repo

  1. If there is a way to get source repo from the fork in CI environments then it would be very easy.
  2. Otherwise, might want to add an additional row in bundlesize config which identifies the repo
  3. I'm not sure if it can be read from .git/config or package.json to avoid step 2

Ideas welcome


If you'd like you can try it out: https://github.com/siddharthkp/bundlesize2

Migration path:

  1. Use the npm package bundlesize2 instead of bundlesize
  2. If you'd like status reported back to github, use the flag --enable-github-checks + authorize bundlesize2 app. More in the docs
  3. If anything breaks, let me know :)

Note: This is only until the new version is ready and then it will be merged back in this project as a major release

from bundlesize.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.