Giter VIP home page Giter VIP logo

github-secrets-cli's Introduction

      ___           ___           ___           ___           ___           ___       ___     
     /\  \         /\__\         /\  \         /\__\         /\  \         /\__\     |\__\    
    /::\  \       /::|  |       /::\  \       /::|  |       /::\  \       /:/  /     |:|  |   
   /:/\:\  \     /:|:|  |      /:/\:\  \     /:|:|  |      /:/\:\  \     /:/  /      |:|  |   
  /::\~\:\  \   /:/|:|  |__   /:/  \:\  \   /:/|:|__|__   /::\~\:\  \   /:/  /       |:|__|__ 
 /:/\:\ \:\__\ /:/ |:| /\__\ /:/__/ \:\__\ /:/ |::::\__\ /:/\:\ \:\__\ /:/__/        /::::\__\
 \/__\:\/:/  / \/__|:|/:/  / \:\  \ /:/  / \/__/~~/:/  / \/__\:\/:/  / \:\  \       /:/~~/~   
      \::/  /      |:/:/  /   \:\  /:/  /        /:/  /       \::/  /   \:\  \     /:/  /     
      /:/  /       |::/  /     \:\/:/  /        /:/  /        /:/  /     \:\  \    \/__/      
     /:/  /        /:/  /       \::/  /        /:/  /        /:/  /       \:\__\              
     \/__/         \/__/         \/__/         \/__/         \/__/         \/__/              

github-secrets-cli's People

Contributors

brendon1555 avatar dependabot[bot] avatar devraj avatar jha-vineet69 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

github-secrets-cli's Issues

Add command to remove a secret

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

Sync secrets from config file (ini/yaml/.env)

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)

Error: Cannot find module 'cli-ux' (looks like cli-ux is not saved in the package.json)

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

  1. Install using npm install -g @anomaly/github-secrets-cli
  2. Check that ghs is installed using ghs -v, see that it's correctly installed
  3. Try ghs config:set
  4. Returns:
     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!

Update deprecated error handling

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

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.