mizdra / node-pipe-if-ci

Node.js implementation of a command to run pipeline only when in a CI environment.
MIT License
0 stars 0 forks source link

Custom env var to decide whether to pipe #5

Open dobesv opened 1 year ago

dobesv commented 1 year ago

Not all our CI builds have the credentials / information available to push data back to GitHub using reviewdog.

It would be nice if I could specify a different environment variable to determine whether to pipe, for example only pipe if I set REVIEWDOG_GITHUB_API_TOKEN or something.

Could be a command line option like

-e, --env-var Environment variable that is checked to trigger the pipe.  Defaults to using ci-info to check for a CI build.
dobesv commented 1 year ago

My current workaround is to have reviewdog default to local with no filter, then if it runs in CI without the needed credentials it just will print the output errors twice.