Code Monkey home page Code Monkey logo

git-label-cli's People

Contributors

jasonbellamy avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

git-label-cli's Issues

Is wildcard in pattern supported (to remove every current label)?

$ git-label-cli remove -p '*' -t dfa3b1cdee334f647fd2f68f71b26f0d7e381f9a
TypeError: labels.map is not a function
    at deleteLabels (/Users/damiano/Desktop/react-simple-app/node_modules/git-label/dist/lib/label.js:143:29)
    at remove (/Users/damiano/Desktop/react-simple-app/node_modules/git-label/dist/index.js:47:34)
    at <anonymous>

Add usage examples to README

Hey @jasonbellamy, thanks for creating this tool.
I'm probably being dumb here, but could you add some usage examples? I've tried all kinds of different ways to try and figure it out on my own but, as you'll see below โ€” I'm failing pretty hard.

jmason at wh0002279 in ~/Desktop
$ npm i -g git-label-cli
/usr/local/bin/git-label -> /usr/local/lib/node_modules/git-label-cli/dist/index.js
[email protected] /usr/local/lib/node_modules/git-label-cli
โ”œโ”€โ”€ [email protected] ([email protected])
โ”œโ”€โ”€ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
โ”œโ”€โ”€ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
โ””โ”€โ”€ [email protected] ([email protected], [email protected])

jmason at wh0002279 in ~/Desktop
$ git-label --repo JamieMason/temp-test

jmason at wh0002279 in ~/Desktop
$ git-label --repo JamieMason/temp-test --token << my api token here >>

jmason at wh0002279 in ~/Desktop
$ git-label --repo JamieMason/temp-test --token << my api token here >> add
[TypeError: glob pattern string required]

jmason at wh0002279 in ~/Desktop
$ git-label --repo JamieMason/temp-test --token << my api token here >> add *
[TypeError: glob pattern string required]

jmason at wh0002279 in ~/Desktop
$ git-label --repo JamieMason/temp-test --token << my api token here >> add '*'
[TypeError: glob pattern string required]

jmason at wh0002279 in ~/Desktop
$ git-label --repo JamieMason/temp-test --token << my api token here >> remove default
[TypeError: glob pattern string required]

jmason at wh0002279 in ~/Desktop
$ git-label --help

  Usage: git-label [options] [command]


  Commands:

    add      Add the specified labels to a repo
    remove   Remove the specified labels from a repo

  Options:

    -h, --help            output usage information
    -i, --interactive     run in interactive mode
    -a, --api <api>       api url
    -t, --token <token>   api token
    -r, --repo <repo>     repo name [username/repo]
    -p, --pattern <glob>  globbing pattern to the label packages


jmason at wh0002279 in ~/Desktop
$ git-label add --help

  Usage: add [options]

  Add the specified labels to a repo

  Options:

    -h, --help  output usage information


jmason at wh0002279 in ~/Desktop
$ git-label remove default --repo JamieMason/temp-test --token << my api token here >>
[TypeError: glob pattern string required]

jmason at wh0002279 in ~/Desktop
$ git-label remove --repo JamieMason/temp-test --token << my api token here >> default
[TypeError: glob pattern string required]

jmason at wh0002279 in ~/Desktop
$ mkdir test

jmason at wh0002279 in ~/Desktop
$ cd test

jmason at wh0002279 in ~/Desktop/test
$ git init
Initialized empty Git repository in /Users/jmason/Desktop/test/.git/

jmason at wh0002279 in ~/Desktop/test on master
$ git-label remove default --repo JamieMason/temp-test --token << my api token here >>
[TypeError: glob pattern string required]

jmason at wh0002279 in ~/Desktop/test on master
$ git-label --repo JamieMason/temp-test --token << my api token here >> remove default
[TypeError: glob pattern string required]

jmason at wh0002279 in ~/Desktop/test on master
$ git-label remove --pattern default --repo JamieMason/temp-test --token << my api token here >>
[TypeError: Reduce of empty array with no initial value]

jmason at wh0002279 in ~/Desktop/test on master
$ git-label remove --pattern 'default' --repo 'JamieMason/temp-test' --token << my api token here >>
[TypeError: Reduce of empty array with no initial value]

jmason at wh0002279 in ~/Desktop/test on master
$ git-label remove --pattern 'bug' --repo 'JamieMason/temp-test' --token << my api token here >>
[TypeError: Reduce of empty array with no initial value]

jmason at wh0002279 in ~/Desktop/test on master
$ git-label remove -i --repo 'JamieMason/temp-test' --token << my api token here >>
? api url https://api.github.com


/usr/local/lib/node_modules/git-label-cli/dist/lib/repo.js:25
      resolve(/(:)(.+)(\.git)/g.exec(res)[2].split('/').filter(function (key, index, xs) {
                                         ^

TypeError: Cannot read property '2' of null
    at /usr/local/lib/node_modules/git-label-cli/dist/lib/repo.js:25:42
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:380:3)

jmason at wh0002279 in ~/Desktop/test on master
$ git-label remove -i
? api url https://api.github.com


/usr/local/lib/node_modules/git-label-cli/dist/lib/repo.js:25
      resolve(/(:)(.+)(\.git)/g.exec(res)[2].split('/').filter(function (key, index, xs) {
                                         ^

TypeError: Cannot read property '2' of null
    at /usr/local/lib/node_modules/git-label-cli/dist/lib/repo.js:25:42
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:380:3)

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.