Git Product home page Git Product logo

github-label-maker's Introduction

github-label-maker

A set of bash scripts for deleting / creating labels within Github


label maker


If you're like me, you create a bunch of Github repos all of the time. And if you're also like me, you work on a team of talented developers who expect a standard set of labels to be present with they're opening PRs. Up until now, I've been creating these manually. I finally decided to be lazy and automate it, thus github-label-maker was born.

Installation and use

To use this repository, clone it down locally, set up your shell environment, and run the scripts.

These scripts expect you to have a Github personal access token exported in your shell, under the name GITHUBTOKEN. That token should have repo access. For more information about creating a Github token, check out their docs.

Once the token is exported, you can run the scripts. There are two of them: delete-labels and create-labels. Their purposes are pretty self-explanatory, but it's important to note that you should run the delete-labels script before the create-labels one.

The create-labels script will take the contents of the labels.json file and create labels with those names and colors. If you need to change the labels you want to create, edit that file (or submit a PR to this repo that makes that configurable :)

Examples

$ delete-labels -o marksost -r github-label-maker

Deleting labels for the following organization and repository:
  Organization: marksost
  Repository: github-label-maker
Getting labels for repository...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2794  100  2794    0     0  25789      0 --:--:-- --:--:-- --:--:-- 25870
Found 17 labels to delete...
Deleting labels from repository...
   Delete label: All Comments Addressed...
   Delete label: Do Not Merge...
   Delete label: Final Review Passed...
   Delete label: Has Dependencies...
   Delete label: Has Unaddressed Comments...
   Delete label: In Development...
   Delete label: In QA...
   Delete label: In Review...
   Delete label: Initial Review Passed...
   Delete label: Needs Final Review...
   Delete label: Needs Rebase...
   Delete label: Pending CI...
   Delete label: QA Failed...
   Delete label: QA Passed...
   Delete label: Ready for QA...
   Delete label: Ready for Review...
   Delete label: Tests Failing...
Labels deleted succesfully!

$ create-labels -o marksost -r github-label-maker

Creating labels for the following organization and repository:
  Organization: marksost
  Repository: github-label-maker
  Creating label with the following settings:
    Name: All Comments Addressed
    Color: 006b75
{"id":858305072,"url":"https://api.github.com/repos/marksost/github-label-maker/labels/All%20Comments%20Addressed","name":"All Comments Addressed","color":"006b75","default":false}

...snip...

  Creating label with the following settings:
    Name: Tests Failing
    Color: b60205
{"id":858305121,"url":"https://api.github.com/repos/marksost/github-label-maker/labels/Tests%20Failing","name":"Tests Failing","color":"b60205","default":false}
Labels created succesfully!

github-label-maker's People

Contributors

marksost avatar cdavanos avatar jameslyon42 avatar tariqc80 avatar

Watchers

James Cloos avatar  avatar

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.