Code Monkey home page Code Monkey logo

ghlabels's People

Contributors

nhooyr avatar

Watchers

 avatar  avatar

ghlabels's Issues

code cleanup

Internal gh wrapper library is hacky with errors.

Delete doesn't escape spaces correctly

Labels with spaces in them, such as status = needs review won't be deleted, and ghlabels won't report an error because of it's idempotent nature.

Workaround:

set REPO "go/wapi"; ghlabels pull $REPO | jq ".[].name" | xargs -I "%" sh -c "ghlabels delete $REPO \"%\"; echo deleted $REPO:%"        

remove automatic org expansion

I'm thinking a command like ghrepos will write to stdout all the repos in the org and then that makes it very easy to chain with ghlabels.

Workflow

Main command

ghlabels sync <org>/<repo> <org>[/<repo>]

Copy labels from one repo to another org or repo. Will never delete labels except for the default labels, unless they too are in the from repo. For labels that already exist, it will just update them.

Why not have a workflow where one pulls into config and then pushes out somewhere?

Just seems like worse UX. Having a config file doesn't really help much in this case because you still want an initial repository from which to pull labels (unless you're a masochist and want to build the json config yourself) and then you also want to make it easy to edit the labels as well which is super easy to do with a repo on github. Using a config file just adds an extra step to the whole process to sync it. I could go an alternate route with the workflow and let you specify exactly what labels to pull and push (then you could pull from the repository you just made your changes on) but that seems more complicated a workflow than this.

Backups with the config file is a moot point because your github repos should be backed up regularly anyway.

Others

These two are needed because the sync command doesn't let you delete or rename labels. This should rarely happen anyway.

Rename command

ghlabels rename lablelBefore labelTo <org>[/<repo>]

Delete command

ghlabels delete label <org>[/<repo>]

Implementation

Will finish the implementation in #5

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.