Comments (7)
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.
Added support for env vars in https://github.com/iotaledger/gh-tangle-release/releases/tag/v0.7.1
from gh-tangle-release.
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.
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.
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.
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gh-tangle-release.