anomaly / github-secrets-cli Goto Github PK
View Code? Open in Web Editor NEWA command line tool for managing Github project secrets
Home Page: https://www.npmjs.com/package/@anomalyhq/github-secrets-cli
License: Apache License 2.0
A command line tool for managing Github project secrets
Home Page: https://www.npmjs.com/package/@anomalyhq/github-secrets-cli
License: Apache License 2.0
Describe the feature or problem you’d like to solve
Add the ability to remove a secret from the repo.
Describe the solution you'd like
Add a command secrets:remove
where the secret name -s
is required. (should still expect the usual args: org, repo, token etc.)
Would also be worth while adding a confirmation before removing the secret with a -y
override to skip for scripting.
examples:
$ ghs secrets:remove -s SECRET -o org -r repo -t TOKEN
Are you sure you wish to remove secret 'SECRET' from org/repo? [Y/n]
$ Y
Secret 'SECRET' has been removed
$ ghs secrets:remove -s SECRET -o org -r repo -t TOKEN -y
Secret 'SECRET' has been removed
Describe the feature or problem you’d like to solve
Instead of storing the personal accesss token in plain text in the config. It should probably be moved to a native secrets store i.e. osx keychain, lastpass-cli
Describe the solution you'd like
Something similar to docker-credentials-helpers and docker-credential-lastpass
Describe the bug
Change the way we are handling errors. See deprecation warning in logs below.
To Reproduce
Trigger any error (eg push to repo that doesnt exist)
ghs secrets:set -s ENV -f .env.prod -r FAKE_REPO -b
Expected behavior
No deprecation warnings.
Logs
> ghs secrets:set -s ENV -f .env.prod -r repo -b
Deprecation: [@octokit/request-error] `error.code` is deprecated, use `error.status`.
at RequestError.get (/Users/brendonlees/.config/yarn/global/node_modules/@octokit/request-error/dist-node/index.js:29:17)
at Object.prettyPrint [as default] (/Users/brendonlees/.config/yarn/global/node_modules/@anomalyhq/github-secrets-cli/node_modules/@oclif/errors/lib/errors/pretty-print.js:31:22)
at Object.exports.handle (/Users/brendonlees/.config/yarn/global/node_modules/@anomalyhq/github-secrets-cli/node_modules/@oclif/errors/lib/handle.js:18:46)
at module.exports (/Users/brendonlees/.config/yarn/global/node_modules/@anomalyhq/github-secrets-cli/node_modules/@oclif/errors/handle.js:1:49) {
name: 'Deprecation'
}
HttpError: Not Found
Code: 404
Stub tests have been generated but not yet filled out.
Describe the feature or problem you’d like to solve
Be able to sync secrets from a config file
Describe the solution you'd like
E.g. .env
file:
KEY1=VALUE1
KEY2=VALUE2
running ghs secrets:set --sync .env
(or something similar) would erase existing secrets and create
KEY1
(=VALUE1) and KEY2
(=VALUE2)
Seems to be similar to another feature request (#12)
Describe the issue
On installation using npm i -g, ghs is missing the cli-ux package (looks like it wasn't saved in the package.json)
Version: @anomalyhq/github-secrets-cli/1.0.1 darwin-x64 node-v14.13.0
Steps To Reproduce
npm install -g @anomaly/github-secrets-cli
ghs -v
, see that it's correctly installedghs config:set
Error: Cannot find module 'cli-ux' ...
Require stack:
- /usr/local/lib/node_modules/@anomalyhq/github-secrets-cli/lib/commands/config/set.js
- /usr/local/lib/node_modules/@anomalyhq/github-secrets-cli/node_modules/@oclif/config/lib/plugin.js
- /usr/local/lib/node_modules/@anomalyhq/github-secrets-cli/node_modules/@oclif/config/lib/config.js
- /usr/local/lib/node_modules/@anomalyhq/github-secrets-cli/node_modules/@oclif/config/lib/index.js
- /usr/local/lib/node_modules/@anomalyhq/github-secrets-cli/node_modules/@oclif/command/lib/command.js
- /usr/local/lib/node_modules/@anomalyhq/github-secrets-cli/node_modules/@oclif/command/lib/index.js
- /usr/local/lib/node_modules/@anomalyhq/github-secrets-cli/bin/run
Code: MODULE_NOT_FOUND
Expected behavior
Should prompt for organization: Which organisation does the repo belong to?:
. This behavior works as expected after installing cli-ux in the ghs package directory.
Logs
See Above!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.