Code Monkey home page Code Monkey logo

Comments (7)

jbolda avatar jbolda commented on June 24, 2024 1

I don't see any issue with picking them up like the action does especially if you can specify them and that takes precedence.

from gh-tangle-release.

obany avatar obany commented on June 24, 2024 1

Added support for env vars in https://github.com/iotaledger/gh-tangle-release/releases/tag/v0.7.1

from gh-tangle-release.

rajivshah3 avatar rajivshah3 commented on June 24, 2024

An easy way to do this would be to specify the environment variable as the default value for a certain option:

.option("--mwm <number>",
        chalk.yellowBright("Minimum weight magnitude to use for attaching the transaction to the tangle"),
        process.env.MWM || "14")

However, an unintended consequence is that if MWM=18 (for example) is defined, it will be shown as the default value in help:

--mwm <number>              Minimum weight magnitude to use for
                              attaching the transaction to the tangle
                              (default: "18")

from gh-tangle-release.

rajivshah3 avatar rajivshah3 commented on June 24, 2024

Actually, I think it would be better to have our own validation since the approach using commander has that weird side effect. We'd have to manually document which environment variables can be used anyway (commander doesn't really support environment variables)

from gh-tangle-release.

jbolda avatar jbolda commented on June 24, 2024

My main concern is that avoid accidentally printing secrets to a CLI log, etc. Theoretically they will be scrubbed, but rather not rely on that.

from gh-tangle-release.

rajivshah3 avatar rajivshah3 commented on June 24, 2024

Good point. In that case we should definitely use our own validation instead of the default value "hack" to reduce the chance that it's printed out

from gh-tangle-release.

obany avatar obany commented on June 24, 2024

QQ should we try and automatically pickup the GITHUB_REPOSITORY and GITHUB_REF env vars when using the CLI (like the action does), or is this going to cause confusion ?

Or should we instead define our own more specific env vars e.g. GTR_RESPOSITORY GTR_REF ?

from gh-tangle-release.

Related Issues (6)

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.